⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
Description: Setup GitHub Pages "gh-pages" branch and "master" branch as subfolders of a parent project folder ("grandmaster").
Author: Chris Jacob @_chrisjacob
Tutorial (Gist): https://gist.github.com/833223
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
<provider | |
android:name=".providers.AssetProvider" | |
android:authorities="@string/provider_asset" | |
android:multiprocess="true" | |
android:exported="true"/> | |
<provider | |
android:name=".providers.AssetTagProvider" | |
android:authorities="@string/provider_assettags" | |
android:multiprocess="true" |
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
#!/bin/bash | |
########################## | |
## Check if run as root ## | |
########################## | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi |
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
// These two need to be declared outside the try/catch | |
// so that they can be closed in the finally block. | |
HttpURLConnection urlConnection = null; | |
BufferedReader reader = null; | |
// Will contain the raw JSON response as a string. | |
String forecastJsonStr = null; | |
try { | |
// Construct the URL for the OpenWeatherMap query |
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
# find head commit | |
git reflog | |
# now reset hard - where N is the head commit found in the reflog | |
git reset --hard HEAD@{N} |
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
Networks = new Mongo.Collection('networks'); | |
Networks.remove({}); | |
if (Meteor.isServer) { | |
Networks.allow({ | |
insert: function (userId, doc) { | |
return true; //userId === doc.userId; | |
}, | |
update: function (userId, doc, fieldNames, modifier) { | |
return true; // userId === doc.userId; |
OlderNewer