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
wget -erobots=off --no-parent --wait=3 --limit-rate=20K -r -p -U "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)" -A htm,html,css,js,json,png,gif,jpeg,jpg,bmp,ttf,svg,woff,woff2,eot http://domain.com/index.html |
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
Step 1: Open file ~/.bashrc | |
Step 2: Uncomment forece_color_prompt=yes | |
# uncomment for a colored prompt, if the terminal has the capability; turned | |
# off by default to not distract the user: the focus in a terminal window | |
# should be on the output of commands, not on the prompt | |
force_color_prompt=yes | |
Step 3: Comment PS1 style. Add the following code to end of ~/.bashrc |
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
; /etc/hhvm/php.ini | |
; php options | |
session.save_handler = files | |
session.save_path = /var/lib/php5 | |
session.gc_maxlifetime = 1440 | |
; hhvm specific | |
hhvm.log.level = Warning | |
hhvm.log.always_log_unhandled_exceptions = 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
ps -elf | awk '/<process_name>/ && !/awk/ {print $4}' | xargs -r kill -s SIGTERM |
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
(function() {var pname = ( (document.title !='')? document.title : document.querySelector('h1').innerHTML );var ga = document.createElement('script'); ga.type = 'text/javascript';ga.src = '//live.vnpgroup.net/js/web_client_box.php?hash=93f97340dee3be6f82e8d12586d0675a&data=eyJzc29faWQiOjIxMzExNjksImhhc2giOiIwODBiNTI0NGQyZTVkMjU1ODgzYjE0NzMzMDVkNzRiOCJ9&pname='+pname;var s = document.getElementsByTagName('script');s[0].parentNode.insertBefore(ga, s[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
#!/bin/bash | |
SAMPLE_ARR=("one" "two" "three" "four") | |
printf ${SAMPLE_ARR[*]} # one two three four | |
printf ${SAMPLE_ARR[@]} # one two three four | |
printf ${SAMPLE_ARR[1]} # two |
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 | |
SAMPLE_ARR=("one" "two" "three" "four") |
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 | |
SAMPLE_DICT=([index1]=value1 [index2]=value) | |
# or | |
SAMPLE_DICT[index1]="value1" | |
SAMPLE_DICT[index2]="value2" |
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 | |
cdr_array=( | |
"rec:/path/to/cdr/rec" | |
"sms:/path/to/cdr/sms" | |
"mgr:/path/to/cdr/mgr" | |
"vou:/path/to/cdr/vou" | |
) | |
for cdr in "${cdr_array[@]}" ; do |
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 | |
ping -c 3 127.0.0.1 | |
if [ $? -ne 0 ]; then | |
printf "Couldn't ping to 127.0.0.1" | |
fi |
OlderNewer