Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
# 1.install gource using HomeBrew | |
$ brew install gource | |
# 2.install avconv | |
git clone git://git.libav.org/libav.git | |
cd libav | |
# it will take 3-5 minutes to complie, be patient. | |
./configure --disable-yasm | |
make && make install |
$ = jQuery | |
TIMEOUT = 20000 | |
lastTime = (new Date()).getTime() | |
setInterval -> | |
currentTime = (new Date()).getTime() | |
# If timeout was paused (ignoring small | |
# variations) then trigger the 'wake' event | |
if currentTime > (lastTime + TIMEOUT + 2000) |
# From the tty_ioctl man page in Linux. | |
# | |
# TIOCGWINSZ struct winsize *argp | |
# Get window size. | |
# | |
# TIOCSWINSZ const struct winsize *argp | |
# Set window size. | |
# | |
# The struct used by these ioctls is defined as | |
# |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
typedef struct { | |
int girlfriend; | |
} holder; | |
typedef struct { | |
holder a; | |
} toplevel; | |
typedef struct { | |
int this; |
/** | |
* A diff utility that compares arrays and returns a list of added, removed, and updated items | |
* | |
* Returns an object with two methods: | |
* diff: do a one-time diff of two arrays | |
* watch: observe a variable on scope and report any changes to a callback | |
* | |
* Invoking the factory is done like so: | |
* <code> | |
* function(listDiff) { |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
#!/usr/bin/env bash | |
# | |
# This is sp, the command-line Spotify controller. It talks to a running | |
# instance of the Spotify Linux client over dbus, providing an interface not | |
# unlike mpc. | |
# | |
# Put differently, it allows you to control Spotify without leaving the comfort | |
# of your command line, and without a custom client or Premium subscription. | |
# |
s/\.fa-chevron-circle-right/\.icon-chevron-sign-right/g | |
s/\.fa-external-link-square/\.icon-external-link-sign/g | |
s/\.fa-sort-amount-desc/\.icon-sort-by-attributes-alt/g | |
s/\.fa-chevron-circle-down/\.icon-chevron-sign-down/g | |
s/\.fa-chevron-circle-left/\.icon-chevron-sign-left/g | |
s/\.fa-arrow-circle-right/\.icon-circle-arrow-right/g | |
s/\.fa-angle-double-right/\.icon-double-angle-right/g | |
s/\.fa-sort-alpha-desc/\.icon-sort-by-alphabet-alt/g | |
s/\.fa-arrow-circle-down/\.icon-circle-arrow-down/g | |
s/\.fa-arrow-circle-left/\.icon-circle-arrow-left/g |
import urllib2 | |
import re | |
import sys | |
from collections import defaultdict | |
from random import random | |
""" | |
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS | |
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE | |
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt" |