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
echo "@reboot /usr/local/bin/forever start -c /usr/bin/node /home/git/deploy/server.js" | crontab |
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
#[allow(dead_code)] | |
struct Point { | |
x: uint, | |
y: uint, | |
} | |
#[allow(dead_code)] | |
struct Cell { | |
point: Point, | |
isWall: bool |
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
#!/bin/bash | |
dd if=/dev/zero of=/swapfile1 bs=1024 count=524288 | |
mkswap /swapfile1 | |
chown root:root /swapfile1 | |
chmod 0600 /swapfile1 | |
swapon /swapfile1 |
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
upstream localhost { | |
server 127.0.0.1:50000; | |
} | |
server { | |
#listen 80 default_server; | |
listen 0.0.0.0:80; | |
listen [::]:80 default_server ipv6only=on; | |
#root /usr/share/nginx/html; |
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
#!/bin/bash | |
# Check to see if the data is already downloaded | |
if [[ -e ./waterData ]]; then | |
echo "Water data already downloaded reading from cache"; | |
else | |
# Data isn't downloaded so grab it from the web | |
echo "No cached data found downloading water data..."; | |
wget -O waterData "http://nwis.waterdata.usgs.gov/ca/nwis/uv/?search_station_nm=russian%20river&search_station_nm_match_type=beginning&county_cd=06097&index_pmcode_00400=1&index_pmcode_00095=1&index_pmcode_00010=1&index_pmcode_63680=1&group_key=NONE&sitefile_output_format=html_table&column_name=agency_cd&column_name=site_no&column_name=station_nm&range_selection=date_range&begin_date=2008-01-01&end_date=2008-12-31&format=rdb&date_format=YYYY-MM-DD&rdb_compression=value&list_of_search_criteria=county_cd%2Csearch_station_nm%2Crealtime_parameter_selection"; | |
fi |
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
#!/bin/bash | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
cd redis-stable | |
make | |
cp src/redis-server /usr/local/bin | |
cp src/redis-cli /usr/local/bin |
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
<?php | |
define('DRUPAL_ROOT', getcwd()); | |
$_SERVER['HTTP_HOST'] = 'default'; | |
$_SERVER['PHP_SELF'] = '/index.php'; | |
$_SERVER['REMOTE_ADDR'] = '127.0.0.1'; | |
$_SERVER['SERVER_SOFTWARE'] = NULL; | |
$_SERVER['REQUEST_METHOD'] = 'GET'; | |
$_SERVER['QUERY_STRING'] = ''; | |
$_SERVER['PHP_SELF'] = $_SERVER['REQUEST_URI'] = '/'; | |
$_SERVER['HTTP_USER_AGENT'] = 'console'; |
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
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections | |
apt-get update | |
apt-get install -y software-properties-common python-software-properties | |
add-apt-repository ppa:webupd8team/java | |
apt-get update | |
apt-get install -y oracle-java7-installer curl | |
apt-get upgrade -y |
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
Packages/* | |
Pristine\ Packages | |
Installed\ Packages | |
Session.sublime_session | |
Backup/ | |
.DS_Store | |
*.swp | |
!Packages/User | |
Settings/License.sublime_license | |
Cache |
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
#!/bin/bash | |
for app in $(ls -d */); { | |
echo $app; | |
cd $app; | |
git reset --hard; | |
git fetch --all; | |
git rebase origin/master; | |
git submodule update; | |
cd ..; |