Skip to content

Instantly share code, notes, and snippets.

@andreia
andreia / gist:1028347
Created June 15, 2011 23:06
Schedule a command to execute one-time
$ echo cmd | at 5am next year
@mislav
mislav / aprompt.png
Last active February 11, 2024 06:40
My zsh prompt. No oh-my-zsh needed
aprompt.png
@paulmillr
paulmillr / active.md
Last active May 15, 2024 02:25
Most active GitHub users (by contributions). http://twitter.com/paulmillr

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Wed, 21 Sep 2022 till Thu, 21 Sep 2023.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter(user => user.followers > 1000)
@erikreagan
erikreagan / mac-apps.md
Created August 4, 2012 19:18
Mac developer must-haves

Mac web developer apps

This gist's comment stream is a collection of webdev apps for OS X. Feel free to add links to apps you like, just make sure you add some context to what it does — either from the creator's website or your own thoughts.

— Erik

@sindresorhus
sindresorhus / git-dirty-checks.md
Created October 16, 2012 11:20
Benchmark results of the fastest way to check if a git branch is dirty

Tested against the WebKit git repo by entering the repo with 1 file dirty.


git diff --quiet --ignore-submodules HEAD # Will tell if there are any uncomitted changes, staged or not.
0.6 sec

git diff-index --quiet HEAD # Only tracked
2 sec

@flopezluis
flopezluis / example.py
Created October 31, 2012 18:13
Batching with Pika
import logging
import pika
from threading import Timer
BATCH_SIZE = 100
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = logging.getLogger(__name__)
@mistakster
mistakster / gist:4193053
Last active October 13, 2015 12:07
onAvailable: Executes the supplied callback when the item with the supplied id is found.
(function (window, document) {
function onLoad(callback) {
if (document.readyState === "complete") {
setTimeout(callback, 1);
} else if (document.addEventListener) {
window.addEventListener("load", callback, false);
} else {
window.attachEvent("onload", callback);
}
anonymous
anonymous / сан.цп
Created November 28, 2013 09:32
пер ДуховноеЛицо = действо(признак) {
сие._признак = признак;
};
ДуховноеЛицо.прообраз.помолиться = действо(молитва) {
паства.внемли(молитва + "\пАминь!");
};
пер Диакон = действо(признак) {
ДуховноеЛицо.вызвать(сие, признак);
сие.сан = "диакон";
@mikeblum
mikeblum / backboneSync
Created February 15, 2014 22:31
Override backbone sync
sync: function (method, model, options) {
Backbone.sync.call(method, model, options);
}
//from http://stackoverflow.com/a/18839219/1377866
@twalker
twalker / backbone-promises.js
Last active September 3, 2023 17:08
Monkey patch Backbone sync operations to return ES6 promises
/**
* backbone-promises returns ES6 Promises for Backbone.sync operations.
* @return {Object} monkey-patched Backbone.
*
*/
define(['backbone-lib', 'es6-promise'], function(Backbone, Promise){
// Backbone.ajax to return native ES6 promises for ajax calls insead of jQuery.Deferreds
Backbone.origAjax = Backbone.ajax;
Backbone.ajax = function ajax(){