http://gerg.ca/talks/go-pycon/
var a int = 42
var b int = 24
// := is assignment with type inferrence
c := a + b
- Slices are like lists
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests | |
# - Access-Control-Max-Age=20days, to minimize repetitive OPTIONS requests |
{ | |
"binary_file_patterns": | |
[ | |
"*.scssc" | |
], | |
"bold_folder_labels": true, | |
"color_scheme": "Packages/Theme - Spacegray/base16-ocean.dark.tmTheme", | |
"drag_text": false, | |
"file_exclude_patterns": | |
[ |
### | |
unused, but cool | |
### | |
parseRange = do -> | |
isInfinity = (x) -> | |
x is Number.NEGATIVE_INFINITY or \ | |
x is Number.POSITIVE_INFINITY or | |
/\-?infinity/i.test x |
require 'formula' | |
class Postgresql < Formula | |
homepage 'http://www.postgresql.org/' | |
url 'http://ftp.postgresql.org/pub/source/v9.3.2/postgresql-9.3.2.tar.bz2' | |
sha256 '700da51a71857e092f6af1c85fcd86b46d7d5cd2f2ba343cafb1f206c20232d7' | |
bottle do | |
sha1 '106eb209038abdaa2cad8d91d2a422404f8fbe56' => :mavericks | |
sha1 '283c27e518a789d2cd57640375be00e18c829ef4' => :mountain_lion |
diff --git a/contrib/hstore/.gitignore b/contrib/hstore/.gitignore | |
index 5dcb3ff..b84aac6 100644 | |
--- a/contrib/hstore/.gitignore | |
+++ b/contrib/hstore/.gitignore | |
@@ -2,3 +2,6 @@ | |
/log/ | |
/results/ | |
/tmp_check/ | |
+/hstore_gram.c | |
+/hstore_gram.h |
public class OAuth { | |
public static HttpRequest signRequest(HttpRequest req, String consumerKey, String consumerSecret) { | |
String nonce = String.valueOf(Crypto.getRandomLong()); | |
String timestamp = String.valueOf(DateTime.now().getTime() / 1000); | |
Map<String,String> parameters = new Map<String,String>(); | |
parameters.put('oauth_signature_method','HMAC-SHA1'); | |
parameters.put('oauth_consumer_key', consumerKey); | |
parameters.put('oauth_timestamp', timestamp); |
isType = do -> | |
getType = (x) -> x.constructor.name | |
[[],{}].reduce ((result, x) -> | |
type = getType(x) | |
result[type] = (y) -> getType(y) is type | |
),{} |
http://gerg.ca/talks/go-pycon/
var a int = 42
var b int = 24
// := is assignment with type inferrence
c := a + b
Website:
http://prediction.io
Install Guide:
http://docs.prediction.io/installation/install-predictionio-on-linux.html
Follow the instructions here: https://www.linode.com/wiki/index.php/PV-GRUB#Ubuntu_12.04_Precise
Basically:
apt-get update
apt-get install -y linux-virtual grub-legacy-ec2