Skip to content

Instantly share code, notes, and snippets.

View iMerica's full-sized avatar

Michael iMerica

  • Austin, Texas
View GitHub Profile
@iMerica
iMerica / mikesFbSidebarRemover.user.js
Created September 22, 2011 04:07
Michael's Scrolling Sidebar Remover
// ==UserScript==
// @name Michael's Badass Facebook Sidebar Remover
// @namespace http://facebook.com/iMichael
// @description Removes that "annoying" side bar you've been complaining about.
// @include http://*.facebook.com/*
// @include https://*.facebook.com/*
// @match http://*.facebook.com/*
// @match https://*.facebook.com/*
// @version 0.0.1
// ==/UserScript==
@iMerica
iMerica / .vimrc
Created May 23, 2012 02:11
Michael's ViM RC
"
" .vimrc
"
" Vim configuration resource file. Specifies desired
" behavior for the vim editor. Place this file at
" ~/.vimrc
"
:set showmode " Tell us when we're in insert mode.
:set expandtab " Convert tabs to number of spaces
@iMerica
iMerica / pretty_git_log
Created April 23, 2013 21:50
pretty git log
git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --
@iMerica
iMerica / .vimrc
Created May 18, 2013 18:54
Michael's VimRC
filetype off
call pathogen#incubate()
call pathogen#helptags()
filetype plugin indent on
set runtimepath^=~/.vim/bundle/ctrlp.vim
syntax enable
set background=light
autocmd VimEnter * NERDTree
set smartindent
set nohlsearch
@iMerica
iMerica / identify_focus_issue.py
Created February 11, 2014 02:59
Identify which app or process is stealing focus on OSX
#!/usr/bin/python
from AppKit import NSWorkspace
import time
t = range(1,100)
for i in t:
time.sleep(3)
activeAppName = NSWorkspace.sharedWorkspace().activeApplication()['NSApplicationName']
print activeAppName
require 'date'
require 'koala'
class BirthdayLiker
FACEBOOK_TOKEN = ENV['FB_OAUTH_KEY']
BIRTHDAY_WORDS = %w(birthday bday birfday birth born)
THANKS_OPTIONS = ['Thank you!', 'Thanks!', 'Appreciate it!']
DATE_TIME_FORMAT = '%Y-%m-%d'
def initialize(birthdate, opts={})
@iMerica
iMerica / frenchpress.md
Last active August 29, 2015 14:17
Perfect French press coffee

How I brew coffee with a French Press

This is the French press routine I've arrived at after experimenting for a while and talking to other coffee aficionados. Am I missing something? Comments welcome!

Requirements

  • French press. I use a Frieling 23oz stainless, but any will do.
  • Measuring cup or food scale.
  • Coarse grain coffee.
  • Food thermometer. I use an infrared thermometer, but a kettle with a built-in thermometer will work too.
@iMerica
iMerica / viscosity-to-ios-connect.rb
Last active May 17, 2024 17:39 — forked from chrisboulton/viscosity-to-ios-connect.rb
Quickly convert all of your Viscosity connections into OVPN configuration files for OpenVPN for iOS (bundles certificates and keys in the files too)
Dir.glob("#{ENV['HOME']}/Library/Application Support/Viscosity/OpenVPN/*/config.conf").each do |file|
certificate_files = ['ca', 'cert', 'key', 'tls-auth']
config_dir = File.dirname(file)
connection_name = nil
new_config = []
File.read(file).lines.each do |line|
line.strip!
if line.start_with?('#viscosity name')
@iMerica
iMerica / facebook_filter.user.js
Last active October 3, 2015 17:39
Facebook Filter
// ==UserScript==
// @name Facebook filter
// @namespace iMerica
// @description Hides Facebook posts you don't want to see.
// @include http://www.facebook.com/*
// @include https://www.facebook.com/*
// ==/UserScript==
// Install:
// Step 1: Install TamperMonkey
@iMerica
iMerica / gcache.js
Created May 16, 2016 18:25
View current page from Google Cache
javascript:void((function(){var%20a=window.location.href.replace(/^http%5C:%5C/%5C/(.*)$/,"$1");location.href="http://www.google.com/search?q=cache:"+escape(a);})())