This file contains hidden or 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
# 1. Update the Gemfile | |
gem 'hipchat' | |
# 2. Retrieve dependencies via the command line | |
$ bundle install | |
# 3. Register a new API Auth Token of type Notification in the Group Admin, which only has access to send messages to rooms (requires admin access). |
This file contains hidden or 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
{ | |
"Version":"2012-10-17", | |
"Statement":[{ | |
"Sid":"AddPerm", | |
"Effect":"Allow", | |
"Principal": { | |
"AWS": "*" | |
}, | |
"Action":["s3:GetObject"], | |
"Resource":["arn:aws:s3:::example.com/*" |
This file contains hidden or 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
# Setup dir and repo | |
mkdir underscore-string | |
cd underscore-string | |
git init | |
# Make some files we'll need | |
touch README.md package.js smart.json | |
# Add the submodule and checkout the desired branch | |
git submodule add git://github.com/epeli/underscore.string.git lib/underscore.string |
This file contains hidden or 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
// Put this in a build.gradle file in the root | |
buildscript { | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
classpath 'com.android.tools.build:gradle:0.7.3+' | |
} | |
} |
This file contains hidden or 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
// List available SDK targets w/ IDs | |
android list targets | |
// Create a project | |
android create project --target <TARGET-ID> --name <YOURAPPNAME> --path <PATH-TO-WORKSPACE>/<YOURAPPNAME> --activity MainActivity --package com.example.YOURAPPNAME | |
// Build a project | |
gradle build | |
gradle assembleDebug |
This file contains hidden or 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
{ | |
"Version": "2014-01-01", | |
"Statement": [{ | |
"Sid": "AllowPublicRead", | |
"Effect": "Allow", | |
"Principal": { "AWS": "*" }, | |
"Action": ["s3:GetObject"], | |
"Resource": ["arn:aws:s3:::BUCKET_NAME/*" ] | |
}] | |
} |
This file contains hidden or 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
<VirtualHost *:80> | |
ServerName myapp.example.com | |
RewriteEngine On | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=permanent] | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName myapp.example.com | |
DocumentRoot /var/www/myapp/current/public | |
<Directory /var/www/myapp/current/public> |
This file contains hidden or 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
$(window).on('beforeunload', function() { | |
$(window).scrollTop(0); | |
}); |
This file contains hidden or 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 _ = { | |
now: Date.now || function() { return new Date().getTime(); }, | |
throttle: function(func, wait, options) { | |
var context, args, result; | |
var timeout = null; | |
var previous = 0; | |
options || (options = {}); | |
var later = function() { |
This file contains hidden or 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
# List active connections | |
sudo netstat -ntlp | |
# Find Node install path | |
whereis node |
NewerOlder