Create an empty directory, download the code and run it:
$ mkdir /tmp/lj
$ cd /tmp/lj
$ wget https://gist.github.com/benbjohnson/5622779/raw/e53d227ebdbea8d513b62ad076feb3f6ac1c1594/luajit.go
$ go run luajit.go
And you should see:
<?php | |
/** | |
* A reference implementation of a custom Couchbase session handler. | |
*/ | |
class CouchbaseSessionHandler implements SessionHandlerInterface { | |
/** | |
* Holds the Couchbase connection. | |
*/ |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
/* http://stackoverflow.com/q/12790337/274261 */ | |
/* Generates random DAGs. The key is to 'rank' the nodes, and | |
only draw edges from lower ranked nodes to higher ranked ones. */ | |
/* Nodes/Rank: How 'fat' the DAG should be. */ |
type ApacheLogRecord struct { | |
http.ResponseWriter | |
ip string | |
time time.Time | |
method, uri, protocol string | |
status int | |
responseBytes int64 | |
elapsedTime time.Duration | |
} |
#include <arpa/inet.h> | |
#include <assert.h> | |
#include <err.h> | |
#include <inttypes.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <strings.h> | |
#define IPv4_BITS 32 |
Create an empty directory, download the code and run it:
$ mkdir /tmp/lj
$ cd /tmp/lj
$ wget https://gist.github.com/benbjohnson/5622779/raw/e53d227ebdbea8d513b62ad076feb3f6ac1c1594/luajit.go
$ go run luajit.go
And you should see:
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
package main | |
import ( | |
"code.google.com/p/go-tour/pic" | |
"image" | |
"image/color" | |
) | |
type Image struct{ |
WARNING: If you're reading this in 2021 or later, you're likely better served by reading:
(This gist was created in 2013 and targeted the legacy GOPATH mode.)
$ ssh -A vm
$ git config --global url."git@github.com:".insteadOf "https://github.com/"
#!/bin/bash | |
# | |
# convert-video.sh | |
# | |
# Copyright (c) 2013-2014 Don Melton | |
# | |
about() { | |
cat <<EOF | |
$program 2.0 of December 3, 2014 |
package.preload['moonscript.transform.names'] = function() | |
local build | |
do | |
local _table_0 = require("moonscript.types") | |
build = _table_0.build | |
end | |
local unpack | |
do | |
local _table_0 = require("moonscript.util") | |
unpack = _table_0.unpack |