Skip to content

Instantly share code, notes, and snippets.

@scisco
scisco / vim_cheatsheet.md
Last active January 17, 2017 14:57 — forked from awidegreen/vim_cheatsheet.md
Vim shortcuts

Favorites

:tabnew   new tab
:vsp      vertical split
:sp       horizental split

c-ww      move around panes
gt        switch between windows
@scisco
scisco / install-comodo-ssl-cert-for-nginx.rst
Created October 7, 2016 19:03 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@scisco
scisco / git_gpt_tower.md
Created September 22, 2016 13:58
Make git gpg work with Tower

source: https://aaronparecki.com/2016/07/29/10/git-tower

Configure your git client to always sign commits:

$ git config --global commit.gpgsign true

Try to sign a commit from the command line before trying it with Tower. Once you're able to successfully sign commits from the command line, you can set it up to work with Tower.

Add no-tty to your GPG configuration, to allow Tower to use it:

@scisco
scisco / colormap.txt
Created July 7, 2016 19:46
NDVI script
# Jun 29 2016
# ---------------------------------------------
# Source: https://github.com/nedhorning/PhotoMonitoringPlugin/blob/master/downloads/luts/NDVIBlu2Red.lut
mode = 255
46 3 120
46 3 120
46 5 121
45 7 122
45 8 123
@scisco
scisco / postgres.md
Created May 13, 2016 15:29
Terminate an unresponsive Postgres session
SELECT 
    pg_terminate_backend(pid) 
FROM 
    pg_stat_activity 
WHERE 
    -- don't kill my own connection!
    pid <> pg_backend_pid()
    -- don't kill the connections to other databases
 AND datname = 'databasename';
@scisco
scisco / cleanup.py
Created May 11, 2016 19:19
rabbitmq queue clean up
import json
import pika
url = 'amqp://url/'
connection = pika.BlockingConnection(pika.URLParameters(url))
channel = connection.channel()
while True:
method_frame, header_frame, body = channel.basic_get('default')
if method_frame:
@scisco
scisco / README.md
Last active May 3, 2016 18:03
LAB to RGB

To test run:

$ python test.py 96 30 -112
[27.036776088952962, 238.07024499380225, 255]

$ python test.py 20 26 -112

[0, 57.81312081380023, 225.2969485439981]

@scisco
scisco / iterm2-solarized.md
Created March 26, 2016 23:59 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)

Solarized

@scisco
scisco / root_unroot_nexus_5x.md
Last active June 15, 2020 19:00
How to root / unroot Nexus 5X

How to root / unroot Nexus 5X

This guide assumes that you have already unlocked the bootloader

Rooting

1- Download latest version of TWRP for Nextus 5X

2- Restart to bootloader

@scisco
scisco / gh-gmail-label-script.js
Created January 25, 2016 17:19 — forked from cobyism/gh-gmail-label-script.js
GitHub Email Notification labeller script for Google Apps/Gmail
var my_teams = ["@github/css", "@github/design"] // Add any teams you want autodetected to this list
var base_label = ["GitHub"]
var my_teams_regex = new RegExp('(' + my_teams.join('|') + ')')
function GitHubThread(thread) {
this._thread = thread
// Determine why we got this message and label the thread accordingly.
//