Skip to content

Instantly share code, notes, and snippets.

View parasquid's full-sized avatar
💭
Keep Calm and Defy Gravity

Tristan parasquid

💭
Keep Calm and Defy Gravity
View GitHub Profile
@parasquid
parasquid / ubuntu-eol.md
Created December 31, 2017 10:06 — forked from dergachev/ubuntu-eol.md
What to do when your ubuntu distro is End-of-Life

Let's say you're using Ubuntu 13.04 (Raring Ringtail, released in April 2013) and it just went End-of-Life on you, because it's supported for only 6 months, and the deprecated packages are taken down after 12 months.

You'll probably figure this out the hard way. When you run sudo apt-get update, it will eventually report these errors:

Ign http://archive.ubuntu.com raring-updates/universe Sources/DiffIndex
Err http://security.ubuntu.com raring-security/main Sources
  404  Not Found [IP: 91.189.91.15 80]
Err http://security.ubuntu.com raring-security/universe Sources
  404  Not Found [IP: 91.189.91.15 80]
# perform a fresh install of Ubuntu 17.10
# upgrade the kernel to v4.13.10
mkdir ~/kernel-v4.13.10
cd ~/kernel-v4.13.10
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310_4.13.10-041310.201710270531_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-headers-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13.10/linux-image-4.13.10-041310-generic_4.13.10-041310.201710270531_amd64.deb
sudo dpkg -i *.deb
@parasquid
parasquid / workflow.md
Last active October 26, 2017 15:03
Branching workflow

When hotfixes need to be applied and deployed to production:

  • Make sure that the hotfix branch is branched off from the production branch and not the development branch.
  • Send a pull request for the production branch. The production branch isn't protected for merges like the development branch, so you can merge them yourself (useful in cases of emergency and no one us there to approve your PR) but if possible, as someone to merge the code for you.
  • Send a pull request to the development branch so the pull request exists in both branches.
  • In case the PR does not merge cleanly with development please branch off from the hotfix branch, fix the merge conflicts, and then merge that into development

Note that the production branch doesn't need to have its own canonical history; only development has that property. This means that in case the production branch becomes fully out of sync with development it is not forbidden to just delete "bad" production branch and just recreate i

@parasquid
parasquid / cloudSettings
Last active November 3, 2020 11:32
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-11-03T11:32:48.885Z","extensionVersion":"v3.4.3"}
@parasquid
parasquid / Global.sublime-settings
Created June 9, 2017 06:17 — forked from benatkin/Global.sublime-settings
excluding node_modules from Sublime Text 2
// Place user-specific overrides in this file, to ensure they're preserved
// when upgrading
{
"folder_exclude_patterns": [".svn", ".git", ".hg", "CVS", "node_modules"]
}
sudo sed -i 's$<listen>.*</listen>$<listen>tcp:host=localhost,port=0</listen>$' /etc/dbus-1/session.conf
# from http://askubuntu.com/a/827956
@parasquid
parasquid / gist:481a382a9dd1130d8e6deb91c6f9946b
Last active January 16, 2017 07:25
allow virtualbox to support osx guests
cd "C:\Program Files\Oracle\VirtualBox\"
VBoxManage.exe modifyvm "osx-vbox" --cpuidset 00000001 000106e5 00100800 0098e3fd bfebfbff
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "iMac11,3"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
VBoxManage setextradata "osx-vbox" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
VBoxManage setextradata "osx-vbox" VBoxInternal2/EfiGopMode 3
@parasquid
parasquid / gist:769758276891e00c4798e76c0e118a27
Created January 8, 2017 03:03
Find out which records are taking up space
SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
SELECT schemaname,relname,n_live_tup
FROM pg_stat_user_tables
ORDER BY n_live_tup DESC;
@parasquid
parasquid / ubuntu-x11
Created December 24, 2016 05:02 — forked from cpliakas/ubuntu-x11
Headless X server on Ubuntu for X11 forwarding
#!/bin/bash
sudo apt-get install xserver-xorg xserver-xorg-core x11-apps x11-xserver-utils
@parasquid
parasquid / .rtorrent.rc
Created September 1, 2016 10:22 — forked from bryanjswift/.rtorrent.rc
rtorrent configuration file with description
# This is an example resource file for rTorrent. Copy to
# ~/.rtorrent.rc and enable/modify the options as needed. Remember to
# uncomment the options you wish to enable.
# Maximum and minimum number of peers to connect to per torrent.
min_peers = 1
max_peers = 100
# Same as above but for seeding completed torrents (-1 = same as downloading)