Skip to content

Instantly share code, notes, and snippets.

View e0da's full-sized avatar

Justin Force e0da

View GitHub Profile
@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 {
@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;
@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")
#!/bin/bash
current=$(dconf read /org/gnome/desktop/input-sources/xkb-options)
swapped="['caps:swapescape']"
capslock="['caps:capslock']"
echo "Current status: $current"
if [ "$current" == "$swapped" ]
then
echo "Making caps and escape WORK NORMALLY"
@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
@ShPakvel
ShPakvel / general_helper.rb
Created October 15, 2014 18:14
Grape permitted_params helper. It works the same as Rails strong params. Only params defined in params block will remain.
module GeneralHelper
def permitted_params
@permitted_params ||= declared(params, include_missing: false)
end
end
@tankerkiller125
tankerkiller125 / firefox-developer.desktop
Created February 24, 2018 20:56
UMake Firefox Developer Edition, Touch Support, Actions Support
[Desktop Entry]
Version=1.0
Type=Application
Name=Firefox Developer Edition
Icon=/home/matthew/.local/share/umake/web/firefox-dev/browser/chrome/icons/default/default128.png
TryExec=/home/matthew/.local/share/umake/web/firefox-dev/firefox
Exec=env MOZ_USE_XINPUT2=1 firefox-developer
Comment=Firefox Aurora with Developer tools
Categories=Development;IDE;Network;WebBrowser;
Terminal=false
@e0da
e0da / README.md
Last active September 16, 2020 20:55
Prompts

e0da prompt

e0da prompt example

.zshrc goes in $HOME, everything else goes in $HOME/share, and you want to brew install zsh-git-prompt. I'm using Gruvbox here with macOS Terminal.

@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
@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