⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
package main | |
import ( | |
"unicode/utf8" | |
) | |
type Item string | |
type Stream chan Item | |
type Acc string |
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
#add the repositories | |
sudo apt-get update && sudo apt-get install -y curl | |
curl https://files.freeswitch.org/repo/ubuntu/freeswitch-1.6/freeswitch_archive_g0.pub | apt-key add - | |
echo "deb http://files.freeswitch.org/repo/ubuntu/freeswitch-1.6/ trusty main" | sudo tee /etc/apt/sources.list.d/freeswitch.list | |
sudo apt-get update | |
# install dependencies |
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
# 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 |
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
#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" |
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
'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'); |
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
package main | |
import ( | |
"fmt" | |
"github.com/jinzhu/gorm" | |
_ "github.com/lib/pq" | |
) | |
func main() { |
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
#!/usr/bin/env sh | |
set -euv | |
# Updated on April 2019 to reflect changes in GN | |
# See: | |
# https://github.com/ninja-build/ninja | |
# https://gn.googlesource.com/gn/ | |
# We need a recent git |
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
package main | |
import ( | |
"database/sql/driver" | |
"encoding/json" | |
"github.com/jinzhu/gorm" | |
_ "github.com/lib/pq" | |
) |