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
var chart = new Highcharts.Chart({ | |
'chart': { | |
'renderTo': 'yw0' | |
}, | |
'exporting': { | |
'enabled': true | |
}, | |
'title': { | |
'text': 'Past Hour' | |
}, |
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
float catalan_nums_rec(int numTerms){ | |
return catalan_nums_aux(numTerms, 1, 1.0); | |
} | |
float catalan_nums_aux(int numTerms, int n, float lastC){ | |
if( n < numTerms ) | |
return catalan_nums_aux(numTerms, n+1, 2*(2*n+1)*lastC/(n+2))); | |
else | |
return 2*(2*n+1)*lastC/(n+2); | |
} |
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 | |
# Set to number of cores your computer has or you want to use | |
export MAGICK_THREAD_LIMIT=8 | |
# Deleted old files | |
rm *.jpg | |
rm *.png | |
rm *.gif | |
rm *.mp4 |
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 | |
rm *.jpg | |
rm *.png | |
rm *.gif | |
rm *.mp4 | |
find ../ -mindepth 1 -maxdepth 1 -mtime -7 -name "*.jpg" -exec cp -t . {} + | |
export MAGICK_THREAD_LIMIT=4 |
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
# This is an example of the kind of things you can do in a configuration file. | |
# All flags used by the client can be configured here. Run Let's Encrypt with | |
# "--help" to learn more about the available options. | |
# Use a 4096 bit RSA key instead of 2048 | |
rsa-key-size = 4096 | |
# Always use the staging/testing server | |
server = https://acme-v01.api.letsencrypt.org/directory |
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
export JAVA_HOME=/usr/lib/jvm/java-7-openjdk/jre | |
program_to_run |
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 | |
# Usage: ./batch_resize.sh input_dir output_dir “10 30 50” | |
# ./batch_resize.sh help | |
# Setup our globals | |
PARAM_CHECK_FAIL=0 | |
INPUT_DIR="" | |
OUTPUT_DIR="" | |
SIZES=() |
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
# Swap file created on DATE | |
/var/swapfile none swap sw 0 0 |
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
xvda 202:0 0 300G 0 disk / | |
xvdf 202:80 0 350G 0 disk | |
├─xvdf1 202:81 0 8G 0 part | |
├─xvdf2 202:82 0 512M 0 part | |
└─xvdf3 202:83 0 341.5G 0 part |
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
<MacGyver> selby: ssh user@host "tar -czf - /folder/to/backup" | tar -xzf - /folder/where/it/should/go |