Skip to content

Instantly share code, notes, and snippets.


Paul Durivage angstwad

View GitHub Profile
enricofoltran / main.go
Last active Oct 19, 2020
A simple golang web server with basic logging, tracing, health check, graceful shutdown and zero dependencies
View main.go
package main
import (
Faheetah / Jenkinsfile.groovy
Last active Oct 23, 2020
Jenkinsfile idiosynchrasies with escaping and quotes
View Jenkinsfile.groovy
node {
echo 'Results included as an inline comment exactly how they are returned as of Jenkins 2.121, with $BUILD_NUMBER = 1'
echo 'No quotes, pipeline command in single quotes'
sh 'echo $BUILD_NUMBER' // 1
echo 'Double quotes are silently dropped'
sh 'echo "$BUILD_NUMBER"' // 1
echo 'Even escaped with a single backslash they are dropped'
sh 'echo \"$BUILD_NUMBER\"' // 1
echo 'Using two backslashes, the quotes are preserved'
sh 'echo \\"$BUILD_NUMBER\\"' // "1"
angstwad /
Created Jan 12, 2016
Better Git Log (git lg)
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
n0531m /
Last active Oct 10, 2020
Google Cloud Platform : ip address range
# nslookup -q=TXT
for LINE in `dig txt +short | tr " " "\n" | grep include | cut -f 2 -d :`
for LINE2 in `dig txt $LINE +short | tr " " "\n" | grep include | cut -f 2 -d :`
darekkay / intellij-monokai-theme.xml
Last active Nov 19, 2019
Monokai Theme for JetBrains IDEs (IntelliJ IDEA, Webstorm, PhpStorm, PyCharm etc.)
View intellij-monokai-theme.xml
<scheme name="Eclectide Monokai" version="142" parent_scheme="Default">
<option name="ADDED_LINES_COLOR" value="295622" />
<option name="ANNOTATIONS_COLOR" value="b2c0c6" />
<option name="CARET_COLOR" value="bbbbbb" />
<option name="CARET_ROW_COLOR" value="" />
<option name="CONSOLE_BACKGROUND_KEY" value="1c1c1c" />
<option name="FILESTATUS_ADDED" value="629755" />
<option name="FILESTATUS_DELETED" value="6c6c6c" />
View 1-Force RGB mode for OS

This Gist contains the script and generated output file for an Acer B276HUL.

The pre-generated file below is known to work with:

  • OS X Mavericks
  • OS X Yosemite
  • OS X El Capitan

For El Capitan:

  1. Restart your Mac while holding Command-R: this puts your Mac into Recovery Mode.
TSiege / The Technical Interview Cheat
Last active Oct 22, 2020
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.
View The Technical Interview Cheat


I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!


yig / JavaScript
Last active Apr 7, 2020
An overview of JavaScript best practices. Geared towards someone with a C/C++/Java/Python background.
View JavaScript

JavaScript reference for non-JavaScript programmers

Author: Yotam Gingold
License: Public Domain (CC0)

This document is intended as a reference or introduction to JavaScript for someone familiar with a language like C/C++/Java or Python. It follows best practices and gathers the scattered wisdom from matny stackoverflow questions and in-depth JavaScript essays. It relies on no external libraries.

hhoover / Vagrantfile1
Last active Dec 22, 2015
Dummy Vagrantfiles
View Vagrantfile1
Vagrant.configure("2") do |config| = "rax"
config.ssh.private_key_path = "~/.ssh/id_rsa_my_private_key"
config.vm.provider :rackspace do |rs|
rs.username = "YOUR USERNAME"
rs.api_key = "YOUR API KEY"
rs.flavor = /512MB/
rs.image = /Ubuntu 12.04/
bzerangue / mac-trim-support-non-apple-ssd.markdown
Created Jun 25, 2012
Enabling TRIM Support on Mac OS X with Non-Apple SSDs
View mac-trim-support-non-apple-ssd.markdown

How To: Enable TRIM with Non-Apple SSD

The guide breaks the process down into three steps, all performed via copying and pasting the code snippets through the terminal window. To launch a terminal window, open the Utilities folder inside the Applications folder and select terminal.

The first step makes a backup of the original IOAHCIBlockStorage file called IOAHCIBlockStorage.original. You will be prompted to enter in your system password when using the "sudo" command, since you are modifying system files. Copy and paste the code into the terminal window, a successful or uneventful response is a new blank terminal line.

sudo cp /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage.original

Next the code patches the IOAHCIBlockStorage file, removing the requirements that the SSD be made by Apple. Copy and paste t

You can’t perform that action at this time.