Skip to content

Instantly share code, notes, and snippets.

View jcmuller's full-sized avatar

Juan C. Müller jcmuller

View GitHub Profile
@jdoconnor
jdoconnor / gist:32ef0314cecb80157c4e
Created September 26, 2014 21:38
Update mtimes based off commit time
#!/bin/bash -e
####
# based on https://gist.github.com/jeffery/1115504
# Helper script to update the Last modified timestamp of files in a Git SCM
# Projects working Copy
#
# When you clone a Git repository, it sets the timestamp of all the files to the
# time when you cloned the repository.
#
# This becomes a problem when you want the cloned repository, which is part of a
@itod
itod / fluid_gmail.js
Last active July 9, 2020 10:42
Gmail Fluid App Userscript
window.fluid.dockBadge = '';
setTimeout(updateDockBadge, 1000);
setTimeout(updateDockBadge, 3000);
setInterval(updateDockBadge, 5000);
function updateDockBadge() {
var newBadge = '';
var res = findInboxAnchorMatchResult();
if (res) {
@jcmuller
jcmuller / vim-maps.vim
Created August 9, 2011 14:59
Useful vim key mappings
""""""""""""""""""""""""
" Useful maps
""""""""""""""""""""""""
" Map <C-L> (redraw screen) to also turn off search highlighting until the
" next search
nnoremap <C-L> :nohl<CR><C-L>
" Don't use arrow keys
map <up> <nop>
map <down> <nop>
@jrallison
jrallison / gist:977391
Created May 17, 2011 21:02
Everything you need to know about rollout

1) Rollout configuration is in models

/web/models/lib/models/config/rollout.rb

$rollout = Rollout.new(REDIS)

$rollout.define_group(:admin) do |user|
  user.admin?
end
require 'rubygems'
require 'yajl/json_gem'
module AP
# a = AP::ParseData.new('/file.txt')
class ParseData
def initialize(file)
@file = file
@ap_scratch = []
@final_results = []
@jcmuller
jcmuller / Nice bash shortcuts
Created October 3, 2010 22:34
Some of my favorite bash tricks
Some of my favorite bash tricks (most of these come straight from Emacs):
Of course, most of these will ONLY work when 'set -o emacs'
C-F Move to next character
C-B Move to previous character
C-A Jump to beginning of line (bol)
C-E Jump to end of line (eol)
M-B Jump to previous word
M-F Jump to next word