Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
December 23, 2020 03:04 pm GMT

Can you use iPad Pro for work?

Yes, you can!

There are many articles on how to use an iPad as a development machine. Mainly concerning browser-based solutions like GitHub Codespaces or similar tools.

My approach is traditional by using Ubuntu on VPS with standard tooling that everyone knows. It does not matter if you are programming in Go, Python, Rust, or doing front-end in React. If youre serious about your work, in the end only thing that matter is *nix.

I will try to dive in and share tips after using iPad Pro for the last 8 months.

Why?

I will not lie if I write that for the sake of practicality. On my MacBook Pro, I installed only three applications. That was Figma, Dash, and iTerm2.

So I thought that iPad is an ideal tool for my workflow. I tried it and never look back. I love the simplicity of the iPad OS. I have apps for each service that I used in a browser, like Reddit(Apollo), Twitter, or Netflix. Now I dont need Safari to have everything under one fingertip.

Oh, and did I mention the most critical feature for productivity? Face ID. Yes, You can chuckle, but the idea to not type your passwords is mind changing if you use 1Password.

I will never get back to Apple hardware without Face ID, so dear Tim, please make a MacBook with those fancy new processors and Face ID...

My Workflow

The whole workflow is based on building websites and applications for my own needs. I rarely do any kind of client work.

So theres a large number of static websites in HUGO, programming in Go, extensive use of GitLab CI/CD for automation, scraping, gathering content or deployment to Cloudflare.

For design I use Figma (Figurative on iPad), retouch in Affinity Photo, sketch in Procreate or Apple Notes.

And, thats about everything I use. Pretty simple, isnt it? I also use iA Writer for exporting to PDF more extensive notes. Yet most of them are written in Vim and stored in Vimwiki.

What I use?

Cost

One time:

Recurring:

  • Linode costs me $40 a month with 4 cores and 8GB of ram, but that cost is heavily depended on your own preferences and needs.

Tips

I dont want to write extensive guides on software that I use, as this was written in all possible ways, and there is always documentation for each one of them. Yet, I want to share what makes my life more comfortable to work from iPad when using them:

1. Mouse Support

Enable mouse support in every application you can. This comes in handy when using an iPad without a keyboard as you can freely change panes in tmux or scroll throughout your apps with your fingers:

In tmux:

set -g mouse on
Enter fullscreen mode Exit fullscreen mode

In VIM:

set mouse=a
Enter fullscreen mode Exit fullscreen mode

In WeeChat:

/set weechat.look.mouse on/mouse enable
Enter fullscreen mode Exit fullscreen mode

Or search for mouse support in the documentation of your favorite CLI application.

2. Caddyfile

Caddy is a lifesaver when youre doing web-related programming and want to quickly access your websites on a development machine. By using Caddyfile stored in your source folder, you can easily control access to it by adding this:

example.com {    reverse_proxy 127.0.0.1:1313}
Enter fullscreen mode Exit fullscreen mode

Now you can use sudo caddy start inside your app directory and use to start your server or caddy stop to terminate it.

How would that work? For example, if youre using HUGO. Start your Caddy server and run this in HUGO directory:

hugo server --port=1313 --baseUrl="example.com" --appendPort=false
Enter fullscreen mode Exit fullscreen mode

Now when you go to example.com, youll see your website. The same is valid for anything else that requires a server or proxy.

You can read more about setting this up here: Reverse proxy quick-start

3. Limit Access

One of the best things you can do is limiting access to your machine using a firewall. You can go with the first-class approach using iptables or by using UFW:

sudo ufw allow proto tcp from $IPAddress to any port 22
Enter fullscreen mode Exit fullscreen mode

Where $IPAddress is your IP or your private VPN (Algo, ipsec-vpn or your own).

Read this for more information: ufw - Uncomplicated Firewall

4. Mosh

With Mosh, I never had a feeling that my terminal is just connected to VPS. Whenever I open Blink, everything is still there as I left it. Slow connection? No problem with Mosh. Constantly changing networks or IP addresses? You will not lose a connection even for a minute.

It's so astonishing that it's hard to describe you have to try it yourself.

5. File Synchronization

Blink SCP is a great tool to upload files to and from the server. Its as simple as using:

scp yourfile hostname:~/
Enter fullscreen mode Exit fullscreen mode

I also heavily use Git and GitLab for that, solely by using the sync repository on the server that I can pull, push or upload files from within GitLab interface.

6. Create bash scripts

Setup Scripts

Thats maybe worn-out advice but write down everything you do more than once. App setup? Write a script. Configuration? Write a script. Deployment? Write a script. For example, if I want to install a node with yarn, use something like this:

#!/usr/bin/env bash# Add Node and Yarn to aptcurl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list# Install packagessudo apt-get updatesudo apt-get install -y nodejs yarn
Enter fullscreen mode Exit fullscreen mode

Yes, you could use NVM, but I dont need it. So its based on your personal needs.

What about setting up NGINX? No problem at all:

#!/usr/bin/env bashmkdir .depDEP="$HOME/.dep"VERSION="nginx-1.18.0"# Install brotli compressionif [[ -d $DEP/ngx_brotli ]]; then    echo "Brotli already installed."else    git clone --depth 1 https://github.com/google/ngx_brotli.git $DEP/ngx_brotli    cd $DEP/ngx_brotli && git submodule update --init && cdfi# Configure and install NGINXcd $DEPwget http://nginx.org/download/$VERSION.tar.gztar -zxvf $VERSION.tar.gzcd $VERSION./configure \    --prefix=/etc/nginx \    --sbin-path=/usr/sbin/nginx \    --modules-path=/usr/lib/nginx/modules \    --conf-path=/etc/nginx/nginx.conf \    --error-log-path=/var/log/nginx/error.log \    --http-log-path=/var/log/nginx/access.log \    --pid-path=/var/run/nginx.pid \    --lock-path=/var/run/nginx.lock \    --http-client-body-temp-path=/var/cache/nginx/client_temp \    --http-proxy-temp-path=/var/cache/nginx/proxy_temp \    --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp \    --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp \    --http-scgi-temp-path=/var/cache/nginx/scgi_temp \    --user=nginx \    --group=nginx \    --with-http_ssl_module \    --with-pcre-jit \    --with-threads \    --with-http_ssl_module \    --with-http_realip_module \    --with-http_addition_module \    --with-http_sub_module \    --with-http_dav_module \    --with-http_flv_module \    --with-http_mp4_module \    --with-http_geoip_module \    --with-http_image_filter_module \    --with-http_v2_module \    --with-http_xslt_module \    --with-http_gunzip_module \    --with-http_gzip_static_module \    --with-http_random_index_module \    --with-http_secure_link_module \    --with-http_stub_status_module \    --with-http_auth_request_module \    --with-threads \    --with-stream \    --with-stream_ssl_module \    --with-http_slice_module \    --with-mail \    --with-mail_ssl_module \    --with-file-aio \    --with-ipv6 \    --add-module=/home/ubuntu/.dep/ngx_brotlimakesudo make installcd# Remove NGINX sourcesrm -rf $DEP/$VERSIONrm -rf $DEP/$VERSION.tar.gz# Copy nginx.servicesudo cp $HOME/.dotfiles/.config/nginx.service /lib/systemd/system/# Create 'nginx' usersudo useradd --no-create-home nginx# Create cache and web directoriessudo mkdir -p /var/cache/nginx/client_tempsudo mkdir /etc/nginx/conf.d/sudo mkdir /var/www/sudo chown nginx:nginx /var/www/# Enable and auto startsudo systemctl enable nginxsudo systemctl start nginx# Generate dhparam certscreen -d -m sudo openssl dhparam -out /etc/ssl/certs/dhparam.pem 4096
Enter fullscreen mode Exit fullscreen mode

You can use Terraform or Ansible, but that is overkill for what is needed from a personal dev machine. Or a single server to host your services.

And no, you do not need any fancy technology, hundreds of servers, or containers system to build a successful online business. Go ahead! If you have experience in it and feel that using them will be a lifesaver for you. In the end, it's your needs that count, not some internet articles. :)

Dont forget about your .dotfiles.

7. Buy external keyboard and mouse

I use Apple Keyboard and a simple Logitech BT mouse. First, Figma will not work without it. Second, if you want to use a keyboard and pencil for design, at the same time, those integrated ones will not work for you. I personally keep the iPad Screen in front of me. On the left of it, I have a keyboard operated by my left hand for switching shortcuts.

This is also my approach since I worked with Wacom tablets, and some people may be able to work comfortably on an iPad with a keyboard in a case. But that is more of a personal preference.

One of the advantages for me is traveling comfortably. I dont need to take an external keyboard or mouse with me. The on-screen keyboard is excellent and works well on such occasions.

Problems?

The iPad is not ideal. The biggest obstacle can be a lack of internet connection. As with slow internet, you can still use Mosh, and have a pleasant experience, that without it you can not work at all.

There are applications like iSH which are trying to fill that gap, but setting it up to resemble working on full-featured Linux is complicated and time-consuming.

Second, dev tools are nonexistent. There is Inspect Browser on iPad, and it has some features. But it is dated and probably abandoned (still waiting for that next big release). How do I deal with it? I absolutely do not care...

Most browsers work similar fashion to each other. So if you do something that works fine on Safari, it will work the same on Firefox and Chromium-based ones. If not, then you will get feedback from annoyed users or colleagues that something is not right.

I know it is the wrong approach. But thanks to this, I have learned to be careful about what and how I do. I try to avoid novelties or technologies that may cause errors. Less is more.

The End

I absolutely enjoy working on an iPad. Would love to have a built-in Terminal or proper dev tools in Safari. Working on iPadOS already resembles the flow from macOS in every possible way. And for me, it only took a few minutes to get used to.

Would I recommend a switch to it? Yes. But not for everyone. There are many cases where the iPad falls short. On the other hand, even if it is for you, you must remember to change your habits. The iPad is an entirely different tool that is operated differently. But now you can use it to do most of the things you've done on a regular computer.

Recommended links:


Original Link: https://dev.to/monkin/using-ipad-pro-for-work-2dbe

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To