Skip to content

Instantly share code, notes, and snippets.

View dvliman's full-sized avatar

David Liman dvliman

View GitHub Profile
// http://people.debian.org/~stapelberg/2014/01/17/debmirror-rackspace.html
// This is a re-implementation of debmirror which is optimized for the Debian
// Code Search use-case: a full sid sources-only mirror, downloaded from
// high-bandwidth mirrors with a Gigabit uplink.
//
// See this blog post for details:
// http://people.debian.org/~stapelberg/2014/01/17/debmirror-rackspace.html
package main
import (
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
// Write a program that converts a human readable column header into a column index.
// A column header is an arbitrary length string of the characters A through Z, e.g: "A", "B", "AB", "BA" or "AAK".
// A represents the first column and its index is 1, B is the second with an index of 2, AA is the 27th column, etc.
// The program should read the column header from standard in and print the result to standard out as a string of digits.
// Given an input string of "A" the program should output only "1".
//
// Note that you can compile and test your code in the browser multiple times before submitting.
import java.io.BufferedReader;
@dvliman
dvliman / gist:9235978
Created February 26, 2014 18:54
edge css
/* normalize.css v2.1.0 | MIT License | git.io/normalize */article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary {
display: block
}
audio,canvas,video {
display: inline-block
}
audio:not([controls]) {
#!/bin/bash
usage() {
cat << EOF
Usage: $0 [OPTION]... COMMAND
Execute the given command in a way that works safely with cron. This should
typically be used inside of a cron job definition like so:
* * * * * $(which "$0") [OPTION]... COMMAND
Arguments:
@dvliman
dvliman / gist:10016069
Created April 7, 2014 07:27
join honey chrome extension
chrome.runtime.onStartup.addListener(function () {
chrome.storage.local.set({
log: ""
})
});
chrome.runtime.onInstalled.addListener(function (a) {
var b = {
log: ""
};
b.site_manifest = {
@dvliman
dvliman / gist:10016177
Created April 7, 2014 07:38
joinhoney affiliate vendors
sites:
"joinhoney.com
cravehoney.com
wanelo.com
wish.com
acehardware.com
ae.com
aeropostale.com
amazon.com
@dvliman
dvliman / gist:10402435
Created April 10, 2014 17:02
ruby $ global variable
$: (Dollar Colon) is basically a shorthand version of $LOAD_PATH. $: contains an array of paths that your script will search through when using require.
$0 (Dollar Zero) contains the name of the ruby program being run. This is typically the script name.
$* (Dollar Splat) is basically shorthand for ARGV. $* contains the command line arguments that were passed to the script.
$? (Dollar Question Mark) returns the exit status of the last child process to finish.
$$ (Dollar Dollar) returns the process number of the program currently being ran.
$~ (Dollar Tilde) contains the MatchData from the previous successful pattern match.
$1, $2, $3, $4 etc represent the content of the previous successful pattern match.
$& (Dollar Ampersand) contains the matched string from the previous successful pattern match.
$+ (Dollar Plus) contains the last match from the previous successful pattern match.
$` (Dollar Backtick) contains the string before the actual matched string of the previous successful pattern match.
@dvliman
dvliman / gist:10789981
Created April 15, 2014 23:47
Google API services
Google Cloud SQL ON
Google Cloud Storage ON
Google Cloud Storage JSON API ON
Google Compute Engine ON
Ad Exchange Seller API
Admin SDK
AdSense Host API
AdSense Management API
Analytics API
Audit API