Skip to content

Instantly share code, notes, and snippets.

@MoOx
MoOx / index.js
Last active June 8, 2025 14:14
Export/import github labels
// go on you labels pages
// eg https://github.com/cssnext/cssnext/labels
// paste this script in your console
// copy the output and now you can import it using https://github.com/popomore/github-labels !
var labels = [];
[].slice.call(document.querySelectorAll(".label-link"))
.forEach(function(element) {
labels.push({
name: element.textContent.trim(),
@dequis
dequis / patch.py
Last active December 19, 2017 19:01
MSN ApplicationId binary patcher for pidgin/bitlbee/etc - OBSOLETE now that pidgin/bitlbee have the correct fix - READ THE COMMENTS!
#!/usr/bin/env python
"""
MSN ApplicationId patcher for pidgin/bitlbee/whatever
(because you're too lazy to rebuild the whole thing.)
Usage examples:
python patch.py /usr/sbin/bitlbee
python patch.py /usr/lib/purple-2/libmsn.so
@henrik
henrik / yosemite_upgrade_notes.md
Last active December 30, 2015 02:29
Yosemite upgrade notes

Yosemite upgrade notes

From a (mostly) Ruby on Rails developer.

After doing the below everything seems to work (some of it worked before doing anything), including Ruby, Gems, RVM, Homebrew, VirtualBox/Vagrant VMs, Pow, tmux, git, vim.

  1. Did a full-disk backup that I can restore from
  2. Moved out /usr/local to avoid super slow install, per option 1 in https://jimlindley.com/blog/yosemite-upgrade-homebrew-tips/: sudo mv /usr/local ~/local
  3. Upgraded to Yosemite
  4. Restored /usr/local, per option 1 in https://jimlindley.com/blog/yosemite-upgrade-homebrew-tips/: sudo mv ~/local /usr
@zhusee2
zhusee2 / README.md
Last active August 29, 2015 14:06 — forked from dlackty/README.md
Modified Ruby version for converting Flightradar24 data to GPX.
@wancw
wancw / git-branches-contain.sh
Last active August 29, 2015 14:04
Utils for merged branch
#!/bin/sh
export FMC_WRAPPER=`basename $0`
MERGE_COMMIT=`git find-merge-commit $*`
if [[ $? != 0 ]]; then
exit $?
fi
git branch --all --contain $MERGE_COMMIT
@beeftornado
beeftornado / rmtree.rb
Created July 16, 2014 22:41
Homebrew external command to remove a formula and its dependencies that are no longer used. Warning: Not all formulas declare all their dependencies.
# Install to /usr/local/Library/Homebrew/cmd/rmtree.rb
require 'keg'
require 'formula'
require 'shellwords'
module Homebrew
def rmtree
raise KegUnspecifiedError if ARGV.named.empty?
@snoozer05
snoozer05 / gist:ca9860c57683e4221d10
Last active August 29, 2015 14:03
Ruby commit count until 2.1.0-p0
* 1: nobu 1870
* 2: akr 716
* 3: nagachika 488
* 4: svn 449
* 5: ko1 423
* 6: naruse 339
* 7: zzak 290
* 8: usa 276
* 9: kazu 149
* 10: drbrain 114
@bf4
bf4 / comment.md
Created July 8, 2014 15:58
invalid %-encoding error in application for malformed uri

Question re: should this be rack's job

# config.ru
run ->(env) {
  [ 200, { 'Content-Type' => 'text/html', }, [Rack::Request.new(env).params.inspect] ]
}
@wancw
wancw / timereport.plugin.zsh
Last active August 29, 2015 14:02
Report elapsed time for command take long time to execute.
typeset -gaU preexec_functions
typeset -gaU precmd_functions
preexec_functions+='preexec_start_timer'
precmd_functions+='precmd_report_time'
_tr_current_cmd="?"
_tr_sec_begin="${SECONDS}"
_tr_ignored="yes"
#=require underscore.js
class BaseClass
@concerning: (concernName, concernObj) ->
functionsToCopy = _.omit(mixin, "included", "classFunctions")
_.extend(this.prototype, functionsToCopy)
_.extend(this, concernObj.classFunctions)
if typeof concernObj.included is "function"
concernObj.included.call(concernObj, this)