⌘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 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
//Facebook Page administrators can add your app directly to their Page by navigating to the following URL: | |
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID&next=YOUR_URL | |
//where YOUR_APP_ID and YOUR_URL can be found in your app settings. | |
https://developers.facebook.com/docs/appsonfacebook/pagetabs/ |
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
#!/usr/bin/env ruby | |
# @see http://stackoverflow.com/a/11522507 | |
if ARGV.empty? | |
$stdout.puts "Usage: cleanup.rb dump.sql table_a [table_b ...]" | |
else | |
args = ARGV.reverse | |
file = args.pop |
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
# A XMLHttpRequest wrapper for IE < 10. | |
# When it comes to cross domain ajax requests, it uses XDomainRequest instead. | |
# ** Only supports GET and POST requests! ** | |
# Targeting IE < 10 | |
# https://github.com/amcintyre-cs/strophejs-plugins/commit/b0a6ff2571bb70dd2f6f65c46034f4e47d75d564 | |
return unless window.XDomainRequest and !("withCredentials" in window.XMLHttpRequest) | |
OriginalXMLHttpRequest = window.XMLHttpRequest | |
window.location.origin ?= window.location.protocol + '//' + window.location.host |
Simple Browserify middleware for Express with basic in-memory caching and watchify support.
I created this as a Gist instead of Node module because Browserify bundles are one of those things better left customizable. This function, as it stands, is very limited. It has no support for things like transforms and plugins. Copy this into your app and add any desired functionality there.
Depends on:
- Browserify - tested on v6.1, expected to work on v4.0+
- Watchify - tested on v2.0, expected to work on v1.0+. Watchify is optional. Remove watchify
require
statement if not desired. - Express - tested with v4.9, expected to work with v3.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
// These window.navigator contain language information | |
// 1. languages -> Array of preferred languages (eg ["en-US", "zh-CN", "ja-JP"]) Firefox^32, Chrome^32 | |
// 2. language -> Preferred language as String (eg "en-US") Firefox^5, IE^11, Safari, | |
// Chrome sends Browser UI language | |
// 3. browserLanguage -> UI Language of IE | |
// 4. userLanguage -> Language of Windows Regional Options | |
// 5. systemLanguage -> UI Language of Windows | |
var browserLanguagePropertyKeys = ['languages', 'language', 'browserLanguage', 'userLanguage', 'systemLanguage']; |
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
/*! | |
* Copyright 2015 Google Inc. All rights reserved. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |