Skip to content

Instantly share code, notes, and snippets.

View dragon788's full-sized avatar

dragon788 dragon788

View GitHub Profile
@dragon788
dragon788 / msys2-here-uninstall.reg
Created February 28, 2016 17:45 — forked from elieux/msys2-here-uninstall.reg
MSYS2 here context menu items
Windows Registry Editor Version 5.00
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MSYS here]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW64 here]
[-HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\MINGW32 here]
@dragon788
dragon788 / dump_stats.py
Created March 29, 2016 23:25 — forked from durden/dump_stats.py
Dump Python pstats file to stdout sorted by cumulative stat
if __name__ == "__main__":
import sys
import pstats
stats = pstats.Stats(sys.argv[1])
stats.strip_dirs()
stats.sort_stats('cumulative')
stats.print_stats()
// ==UserScript==
// @id github-md5-hashes@erikvold.com
// @name Github MD5 Hashes
// @version 1.0
// @namespace github-md5-hashes
// @author Erik Vold
// @description
// @include http*//github.com*
// @run-at document-end
// ==/UserScript==
@dragon788
dragon788 / remotemd5.py
Created March 31, 2016 23:53 — forked from brianewing/remotemd5.py
Python MD5 of remote file (URL)
import os, hashlib, urllib2, optparse
def get_remote_md5_sum(url, max_file_size=100*1024*1024):
remote = urllib2.urlopen(url)
hash = hashlib.md5()
total_read = 0
while True:
data = remote.read(4096)
total_read += 4096
key=ENV['key']
vars = Hash.new
vars["key"]=ENV['key']
Vagrant.configure(2) do |config|
config.vm.box = "hashicorp/precise32"
config.vm.provision "shell", inline: "echo var key=#{key}"
config.vm.provision "shell", path: "provision.sh", args: "arg1", env: vars
end
" what @alfredodeza will type into your vim if you leave your terminal unlocked
" on linux, replace "say" with "espeak" (and hope it's installed)
:nnoremap <silent> u u:call system("say -v whisper 'balls'")<CR>
@dragon788
dragon788 / README.md
Created April 9, 2016 22:09 — forked from datagrok/README.md
What happens when you cancel a Jenkins job

When you cancel a Jenkins job

Unfinished draft; do not use until this notice is removed.

We were seeing some unexpected behavior in the processes that Jenkins launches when the Jenkins user clicks "cancel" on their job. Unexpected behaviors like:

  • apparently stale lockfiles and pidfiles
  • overlapping processes
  • jobs apparently ending without performing cleanup tasks
  • jobs continuing to run after being reported "aborted"
@dragon788
dragon788 / git-serve.md
Created April 10, 2016 01:24 — forked from datagrok/git-serve.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.

Launch a one-off git server from any local repository.

I [tweeted this already][1] but I thought it could use some expansion:

Enable decentralized git workflow: git config alias.serve "daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/"

Say you use a git workflow that involves working with a core "official" repository that you pull and push your changes from and into. I'm sure many companies do this, as do many users of git hosting services like Github.

Say that server, or Github, goes down for a bit.

@dragon788
dragon788 / prefs.js
Created April 15, 2016 12:35 — forked from johnbender/prefs.js
Set up Chrome Secure Shell to handle solarized terminal colors
// Disable bold.
term_.prefs_.set('enable-bold', false)
// Use this for Solarized Dark
term_.prefs_.set('background-color', "#002b36");
term_.prefs_.set('foreground-color', "#839496");
term_.prefs_.set('color-palette-overrides', [
'#073642',
'#dc322f',
@dragon788
dragon788 / solarized_setup.js
Created April 15, 2016 12:36 — forked from baldwicc/solarized_setup.js
Solarized Light and Solarized Dark for Chrome Secure Shell (nassh), with fonts
/**
* STEP 1: Setup
* - Open Chrome Secure Shell settings
* - Open JS Console (CTRL+SHIFT+J)
* - Copy and paste the following:
*/
var s7d_colours = {
'base03': '#002b36',
'base02': '#073642',
'base01': '#586e75',