git clone <repo>
clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS
Add colors to your ~/.gitconfig file:
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
function name (id, l) { | |
function n(){return id=(399*id)%509} | |
var r="BDGKNPTVZ"[n()%9] | |
for (var i=1;i<l;i++) r+=i%2?"aeiou"[n()%5]:"bdgknptvz"[n()%9] | |
return r | |
}; | |
// id=seed, l=length | |
function name (id, l) { | |
// lcg prng |
// while this is not technically a method, a Runnable is close enough for me. | |
// this method wants a "method" as an input | |
void canHazMethod(Runnable methodToRun) { | |
// run the method passed in | |
methodToRun.run(); | |
} | |
// this is the method I will use: | |
Runnable myMethod = () -> { |
public static void main(String[] args) { | |
// this uses a java 8 feature called method references (i think) | |
// it looks for method "aThingToDo" in class "methoding" (the name of this class) | |
// aThingToDo must match the pattern, as doAThing says | |
doAThing(methoding::aThingToDo); | |
} | |
// define a pattern for what type of method we want | |
// we want a method with String s as input and no return (void) | |
public interface voidMethod { |
// compile with: | |
// g++ oodle.cpp -o oodle -std=c++14 | |
#include <iostream> | |
#include <string> | |
#include <regex> | |
#include <vector> | |
int main(int argc, char* argv[]) { | |
if (argc == 1) { |
This is a compiled list of falsehoods programmers tend to believe about working with time.
Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.
/* Compile with -DUSE_READLINE and -lreadline to use readline for input. */ | |
#include <arpa/inet.h> | |
#include <errno.h> | |
#include <poll.h> | |
#include <signal.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/socket.h> |
#include <stdio.h> | |
#define $x ,x | |
#define $i ,i | |
#define eval int | |
#define read scanf | |
#define $scanfpat "%d", & | |
#define $(x) ,(x) | |
#define $open ( | |
#define $close ) | |
#define do { |