This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Readable emails | |
// @namespace http://example.com | |
// @author [email protected] | |
// @match https://mail.google.com/* | |
// @version 1.0 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle('.ii { font: 160% Serif !important; }'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if defined? PryDebugger | |
Pry.commands.alias_command 'c', 'continue' | |
Pry.commands.alias_command 'f', 'finish' | |
Pry.commands.alias_command 'n', 'next' | |
Pry.commands.alias_command 's', 'step' | |
end | |
def __objects__(filter) | |
GC.disable | |
enum = ObjectSpace.each_object(filter) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maps a Rails route to a dynamic action name using interpolation. | |
# | |
# get 'experiments/ajax/:endpoint', to: dynamic('experiments#ajax_%{endpoint}') | |
class Dynamic | |
def initialize(to) | |
@to = to | |
end | |
def call(env) | |
params = env['action_dispatch.request.path_parameters'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Github Large Emoji | |
// @namespace example | |
// @include https://github.com/* | |
// @version 1.0 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle('img.emoji { width: 64px; height: 64px }'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'active_record' | |
require 'colorize' | |
require 'pry' | |
class Eigenlogger | |
def debug? | |
true | |
end | |
def debug(message) | |
message.uncolorize =~ /^ (.*?) (.*)$/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
d = "!cd ${GIT_PREFIX:-.} && git diff && [[ -z \"$(git diff)\" ]] && git diff --staged && [[ -z \"$(git diff --staged)\" ]] && git log -p master.." | |
l = "!cd ${GIT_PREFIX:-.} && if [[ -z \"$(git diff --name-only && git diff --name-only --staged)\" ]]; then git log --stat master..; else git status; fi" | |
book = bookmark | |
drop = stash save 'dropping local changes' | |
touch = "!GIT_COMMITTER_DATE=\"`date`\" git commit --amend --date \"`date`\"" | |
wip = stash save 'work in progress' | |
[color] | |
ui = auto | |
[core] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Github Praise | |
// @namespace example | |
// @include https://git.musta.ch/* | |
// @include https://github.com/* | |
// @version 1.2 | |
// @grant GM_addStyle | |
// ==/UserScript== | |
GM_addStyle('.line-age { padding: 0px 12px !important; }'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [[ $1 == '' ]] | |
then | |
ruby -e 'branches = `git branch`.split($/)' \ | |
-e 'merged = `git branch --merged master`.split($/)' \ | |
-e '(branches & merged).each { |d| d[2...2] = "\e[32m" }' \ | |
-e 'print branches.join("\e[m\n").gsub("* ", "* \e[33m")' \ | |
-e 'puts "\e[m"' | |
elif [[ $1 == '-' ]] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Peace of Mind | |
// @namespace http://example.com | |
// @description Facebooking without newsfeed. | |
// @include https://*.facebook.com/* | |
// @grant none | |
// ==/UserScript== | |
(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'json' | |
# This script extracts the structure of Sublime language grammars ... | |
# | |
# Usage: ruby tmLanguage.rb PHP.JSON-tmLanguage | |
$root = JSON.parse(File.read(ARGV.first)) | |
$seen = [] | |
$stack = [] |