Skip to content

Instantly share code, notes, and snippets.

icholy / map_filter_reduce.go
Last active February 20, 2017 01:44
chaining channels in go
View map_filter_reduce.go
package main
import (
type Item string
type Stream chan Item
type Acc string
View freeswitch 1.6 build steps Ubuntu
#add the repositories
sudo apt-get update && sudo apt-get install -y curl
curl | apt-key add -
echo "deb trusty main" | sudo tee /etc/apt/sources.list.d/freeswitch.list
sudo apt-get update
# install dependencies
mraible /
Last active September 30, 2020 22:47
Upload optimized assets to Google Cloud Storage
# Rsync to remove old files
gsutil -m rsync -x '.git*' -c -d -r dist gs://bucket/
# Upload and gzip HTML, CSS and JavaScript
gsutil -m cp -z "html,css,js" -r dist/** gs://bucket/
# Set expires headers (6 months) on JS and CSS assets
gsutil -m setmeta -h "Cache-Control: public, max-age=15552000" gs://bucket/assets/**
# Make sure there's no expiration headers on HTML files
dspezia / example.c
Created November 26, 2012 18:26
Example of Redis zset polling daemon
View example.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <time.h>
#include "hiredis.h"
#include "async.h"
#include "adapters/ae.h"
#include "sha1.h"
voter101 / Gulpfile.js
Last active November 29, 2021 01:17
Gulpfile for Rails application with replaced Sprockets with Gulp
View Gulpfile.js
'use strict'
var gulp, sass, babelify, browserify, watchify, source, util;
gulp = require('gulp');
sass = require('gulp-sass');
babelify = require('babelify')
browserify = require('browserify');
watchify = require('watchify');
source = require('vinyl-source-stream');
jinzhu / main.go
Created October 1, 2015 00:07
handle postgres json with gorm
View main.go
package main
import (
_ ""
func main() {
mohamed /
Last active September 23, 2022 06:25
Build Google gn build tool standalone
#!/usr/bin/env sh
set -euv
# Updated on April 2019 to reflect changes in GN
# See:
# We need a recent git
yanmhlv / example.go
Created February 8, 2016 14:49
JSONB in gorm
View example.go
package main
import (
_ ""
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt