Skip to content

Instantly share code, notes, and snippets.

View e0da's full-sized avatar

Justin Force e0da

View GitHub Profile
@OpenNingia
OpenNingia / terminal_color_scheme
Last active July 27, 2017 09:01
Simple script to apply Solarized color scheme to Pantheon Terminal
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""Solarized theme for pantheon-terminal
see http://ethanschoonover.com/solarized
"""
import posixpath
import sys
from gi.repository import Gio
@adamhjk
adamhjk / Guardfile
Last active December 17, 2015 03:19
A Guardfile with inline support for test-kitchen, before we turn it into a gem.
# A sample Guardfile
# More info at https://github.com/guard/guard#readme
require 'guard/guard'
require 'mixlib/shellout'
module ::Guard
class Kitchen < ::Guard::Guard
def start
::Guard::UI.info("Guard::Kitchen is starting")
@kennyp
kennyp / git-by-date
Created February 26, 2013 20:30
If you need to sort files by creation date in git. ex. `find . -name '*.rake' | git by-date`
#!/usr/bin/bash
while read f
do
echo "$(git log --format="%at" --reverse "$f" | head -n1) --> $f"
done | sort -n
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@weakish
weakish / aptitude-solarized-dark-tweak.pl
Created June 26, 2012 09:06
tweak #aptitude color style in #solarized dark terminal
# aptitude is incompatible with a terminal in solarized dark.
# So we need to tweak aptitude's color style.
# Put the following lines in `~/.aptitude/config`.
# (And use `sudo -E aptitude` instead of `sudo aptitude`.
Aptitude::UI::Styles {
Default {
bg default;
};
DepBroken {
fg white;
@e0da
e0da / gist:1989787
Created March 6, 2012 23:35
Hashing and checking SSHA passwords in Ruby
#!/usr/bin/env ruby
require 'base64'
require 'digest'
# get 16 random hex bytes
#
def new_salt
16.times.inject('') {|t| t << rand(16).to_s(16)}
end

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@shawn-sterling
shawn-sterling / graphite
Created February 14, 2012 21:30 — forked from drawks/graphite
Graphite on uwsgi/nginx
#This is the "site config" for nginx
upstream django {
# Distribute requests to servers based on client IP. This keeps load
# balancing fair but consistent per-client. In this instance we're
# only using one uWGSI worker anyway.
ip_hash;
server unix:/tmp/uwsgi.sock;
}
server {
@tsaniel
tsaniel / LICENSE.txt
Created September 2, 2011 12:17 — forked from 140bytes/LICENSE.txt
Konami Code easter egg
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE