Skip to content

Instantly share code, notes, and snippets.

lucasfais / gist:1207002
Created Sep 9, 2011
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
dspezia / example.c
Created Nov 26, 2012
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"
icholy / map_filter_reduce.go
Last active Feb 20, 2017
chaining channels in go
View map_filter_reduce.go
package main
import (
type Item string
type Stream chan Item
type Acc string
voter101 / Gulpfile.js
Last active Nov 29, 2021
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');
mohamed /
Last active Sep 23, 2022
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
jinzhu / main.go
Created Oct 1, 2015
handle postgres json with gorm
View main.go
package main
import (
_ ""
func main() {
mraible /
Last active Sep 30, 2020
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
View example.go
package main
import (
_ ""
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