- Project:
{ type: "project", id: <id>, featured: <bool> }
- User:
{ type: "user", id: <id> }
- Tag:
{ type: "tag", name: <name> }
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Competitions | |
import Data.Competition | |
-- List operations | |
import Data.List | |
------------------------ | |
-- Type Instance | |
------------------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% set goversion = 'go1.2' %} | |
gvm: | |
cmd.run: | |
- name: bash < <(curl -s https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer) | |
- user: deploy | |
- require: | |
- user: deploy | |
go1.2: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE (u:User { user })-[:BUYS]->(p:Product { product }) RETURN u, p; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require('express') | |
, knox = require('knox') | |
var bucket = 'your-bucket' | |
, s3 = knox.createClient({ | |
secure: true, | |
bucket: bucket, | |
key: your_key, | |
secret: your_secret | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- KEYS:[zset], ARGV:[now] | |
-- the sorted set contains key / next pairs, where next is the next execution time | |
-- Find all upcoming tasks | |
-- Get their intervals and requeue them | |
local refs = redis.call("zrangebyscore", KEYS[1], 0, ARGV[1]) | |
for i,ref in pairs(refs) do | |
tref, int = string.match(ref, "([^|]*)|(\d+)") | |
redis.call("zincrby", KEYS[1], int, tref) | |
refs[i] = tref |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function ( grunt ) { | |
/** | |
* Load required Grunt tasks. These are installed based on the versions listed | |
* in `package.json` when you do `npm install` in this directory. | |
*/ | |
grunt.loadNpmTasks('grunt-contrib-clean'); | |
grunt.loadNpmTasks('grunt-contrib-copy'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-concat'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
rcversion = '1.0'; | |
load('underscore.min.js') | |
// NOTES | |
// Basics, wrap the whole thing in a function | |
// Set a version for sanity's sake | |
// Load underscore, a must in any javascript environment |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Push your current branch to origin and open a pull request to upstream:$1 or upstream:master | |
pullreq() | |
{ | |
local browser=google-chrome # replace with your browser command | |
local regex='(https?://|git://|git@)([a-zA-Z0-9\.]+)[:/]([a-zA-Z0-9]+)/(.+)?' | |
local origin=$(git remote -v | grep origin | grep push | cut -f2 | cut -d' ' -f1) | |
local upstream=$(git remote -v | grep upstream | grep fetch | cut -f2 | cut -d' ' -f1) | |
local params=$(python -c "import sys;import re;print ':'.join(re.match('${regex}',sys.argv[1]).groups()[1:])" $origin) | |
local site=$(echo $params | cut -d':' -f1) |