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 / git-clone-single-branch.sh
Last active December 15, 2015 22:08
Only clone one branch
git clone -b mybranch --single-branch git://sub.domain.com/repo.git
@Starefossen
Starefossen / git-1-8-ubuntu.sh
Last active December 15, 2015 22:09
Get GIT 1.8 in Ubuntu 12.04 TLS
sudo add-apt-repository ppa:pdoes/ppa
@Starefossen
Starefossen / build-bootstrap-3.sh
Last active December 15, 2015 22:09
Build and make the bootstrap 3.0.0-wip branch
#!/bin/sh
# build bootrstap source
make clean
make
make bootstrap
#make gh-pages
# generate docs (_gh_pages/)
jekyll
@Starefossen
Starefossen / update_pg.sql
Created April 9, 2013 06:44
Appending and prepending strings row during i Postgres.
update myTable set myField=('prepend' || myField || 'append') where myId=1 RETURNING myField
@Starefossen
Starefossen / ubuntu-server-install.sh
Last active December 16, 2015 22:29
My default installation for Ubuntu 12.04 TLS servers
dpkg-reconfigure keyboard-configuration
apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install python-software-properties # get add-apt-rerepository cmd
add-apt-repository ppa:pdoes/ppa # get Git v1.8
apt-get update
apt-get install openssh-client openssh-server fish git git-man unattended-upgrades
# fish shell install
@Starefossen
Starefossen / post-clone-vm.sh
Last active December 16, 2015 22:39
When cloning virtual machines in Parallels; remember to edit these files.
vim /etc/udev/rules.d/70-persistent-net.rules
sudo hostname <hostname>
sudo vim /etc/hostname
sudo vim /etc/hosts
sudo apt-get install --no-install-recommends texlive-full
@Starefossen
Starefossen / git-noverify.sh
Created May 5, 2013 06:52
Skip pre commit verification hook
git commit -n
git commit --noverify
@Starefossen
Starefossen / nginx-reload.sh
Created May 5, 2013 07:47
Reload nginx config
sudo kill -HUP <PID>
@Starefossen
Starefossen / prl-tools-upgrade.sh
Created June 6, 2013 13:42
Upgrading parallels tools for Ubuntu 12.04 LTS server guest OS.
sudo mount /dev/cdrom /media/cdrom
# or
sudo mount /dev/cdrom1 /media/cdrom