Skip to content

Instantly share code, notes, and snippets.

View Starefossen's full-sized avatar
🚀
Building platforms for the Norwegain Government

Hans Kristian Flaatten Starefossen

🚀
Building platforms for the Norwegain Government
View GitHub Profile
@Starefossen
Starefossen / gist:59e5910c15715bc73f8e5e07caf5171c
Created December 26, 2019 21:56
Restart macOS with File Vault 2 enabled remotely
sudo fdesetup authrestart
@Starefossen
Starefossen / data.json
Last active August 22, 2019 11:25
Numerics
{
"postfix": "Rain",
"color": "green",
"data": {
"value": "🌦"
}
}
@Starefossen
Starefossen / gist:ea624b6da1b4e12e9b06e7b1e0254ca5
Created April 22, 2019 18:22
Get default browser on macOS
VERSIONER_PERL_PREFER_32_BIT=1 perl -MMac::InternetConfig -le 'print +(GetICHelper "http")[1]
@Starefossen
Starefossen / README.md
Last active March 19, 2019 12:18
Run Octave using Vagrant

Install

  1. Download and install Vagrant
  2. Download and install Virtual Box
  3. Download the file bellow; name must be "Vagrantfile"

Run

Go to the folder where your "Vagrantfile" in your terminal/shell. Run the following commands:

FROM ubuntu
MAINTAINER Example McAuthor
RUN apt-get update
RUN apt-get install -y \
mongodb-10gen
RUN mkdir -p /data/db
EXPOSE 27017
@Starefossen
Starefossen / gist:7e2a8ef40ba099acbee5ed72e89d0f8e
Last active December 27, 2017 21:53
Docker Machine with Docker v1.13.1
docker-machine create --driver virtualbox --virtualbox-cpu-count 2 --virtualbox-memory 4096 --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.13.1/boot2docker.iso default
@Starefossen
Starefossen / fish-shell-ubuntu-install.sh
Last active November 12, 2017 14:01
Install Fish shell on Ubuntu 12.04 LTS
# change to root user
su root
# add repository public key to aptitude
wget http://download.opensuse.org/repositories/home:/siteshwar/Ubuntu_12.04/Release.key
apt-key add - < Release.key
rm Release.key
# install fish
echo 'deb http://download.opensuse.org/repositories/home:/siteshwar/Ubuntu_12.04/ /' >> /etc/apt/sources.list.d/osc.list

Yank lines 81-91

:81,91y<enter>

If your fingers don't like to find the : and , keys, this would work as well (go to line 81, yank 11 lines)

81gg11yy 

My only use of g is 5gg. To go to the 5th line. 22gg: 22nd line. As jimbo said, it's really only a modifier for some other commands.

@Starefossen
Starefossen / gist:be30fa4a1468a1472a02
Created March 9, 2016 08:22
VIM: Reformat Paragraph
gqip
  • Vagrant
  • VirtualBox
  • Xcode Command Line Tools (git and c compiler)
  • Tmux
  • Vim modules