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
if(INSTR({string_or_var}, '-'), (REPLACE( SUBSTRING( SUBSTRING_INDEX( {string_or_var}, '-', 1 ) , | |
LENGTH( SUBSTRING_INDEX( {string_or_var}, {string_or_var}, 1 -1 ) ) +1 ) , '-', '' )), '') | |
if(INSTR({string_or_var}, '-'), (REPLACE( SUBSTRING( SUBSTRING_INDEX( {string_or_var}, '-', 2 ) , | |
LENGTH( SUBSTRING_INDEX( {string_or_var}, {string_or_var}, 2 -1 ) ) +1 ) , '-', '' )), '') |
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/sh | |
SCRIPT="#!/bin/sh | |
if [ \${1} == \"--help\" ]; then | |
/opt/sublime_text/sublime_text --help | |
else | |
/opt/sublime_text/sublime_text | |
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
#!/bin/sh | |
sudo su -c 'echo -e "ka 01 01\r\n" > /dev/ttyUSB0' | |
sleep 15 | |
sudo su -c 'echo -e "kf 01 07\r\n" > /dev/ttyUSB0' | |
sleep 1 | |
sudo su -c 'echo -e "kb 01 09\r\n" > /dev/ttyUSB0' | |
sleep 1 | |
sudo su -c 'echo -e "mc 01 0E\r\n" > /dev/ttyUSB0' |
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
alias ports='lsof -i -n -P' # view programs using an internet connection | |
alias portstats='sudo netstat -s' # show statistics for all ports | |
alias tcpstats='sudo netstat -st' # show statistics for tcp ports | |
alias tcp_='sudo netstat -atp' # list all TCP ports | |
alias tcp_trace='pkt_trace tcp' # to show all TCP packets | |
alias udpstats='sudo netstat -su' # show statistics for udp ports | |
alias udp='sudo netstat -aup' # list all UDP ports | |
alias udp_trace='pkt_trace udp' # to show all UDP packets |
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
; Sample supervisor config file. | |
[unix_http_server] | |
file=/tmp/supervisor.sock ; (the path to the socket file) | |
;chmod=0700 ; sockef file mode (default 0700) | |
;chown=nobody:nogroup ; socket file uid:gid owner | |
;username=user ; (default is no username (open server)) | |
;password=123 ; (default is no password (open server)) | |
;[inet_http_server] ; inet (TCP) server disabled by default |
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 map() { | |
emit(1, { | |
sum: this.value, // the field you want stats for | |
min: this.value, | |
max: this.value, | |
count: 1, | |
diff: 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
--- | |
# ^^^ YAML documents must begin with the document separator "---" | |
# | |
#### Example docblock, I like to put a descriptive comment at the top of my | |
#### playbooks. | |
# | |
# Overview: Playbook to bootstrap a new host for configuration management. | |
# Applies to: production | |
# Description: | |
# Ensures that a host is configured for management with Ansible. |
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
update: | |
bin/manager --copy-configs | |
composer install | |
npm install | |
bower install | |
git ls-files --others --exclude-standard | grep db-evolutions | xargs -i '{}' rm {} || true | |
bin/manager -c # clear cache | |
bin/manager --drop-all-tables | |
bin/manager -m # run migrations | |
bin/manager --doctrine-fixture-load |
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
[ | |
"Algeria", "Iran", "Belarus", "Romania", "Philippines", "Philippines", "Spain", | |
"Spain", "Cameroon", "Brazil", "Iraq", "Philippines", "Myanmar", "Philippines", | |
"India", "Pakistan", "Pakistan", "Argentina", "Ethiopia", "India", "Romania", | |
"China", "Somalia", "China", "China", "China", "United States", "Azerbaijan", | |
"Russia", "Russia", "India", "Turkey", "Indonesia", "Philippines", "India", | |
"Moldova", "United States", "India", "Mali", "Cameroon", "Indonesia", "Iran", | |
"Turkey", "Indonesia", "India", "Thailand", "Central African Republic", "Egypt", | |
"Egypt", "Bosnia and Herzegovina", "Indonesia", "Gambia", "India", "China", "China", | |
"China", "China", "Spain", "Algeria", "India", "Belarus", "Brazil", "Venezuela", |
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
[ | |
{"city" : "Bab Ezzouar", "country":"Algeria"}, | |
{"city" : "Babol", "country":"Iran"}, | |
{"city" : "Babruysk", "country":"Belarus"}, | |
{"city" : "Bacău", "country":"Romania"}, | |
{"city" : "Bacolod", "country":"Philippines"}, | |
{"city" : "Bacoor", "country":"Philippines"}, | |
{"city" : "Badajoz", "country":"Spain"}, | |
{"city" : "Badalona", "country":"Spain"}, | |
{"city" : "Bafoussam", "country":"Cameroon"}, |
OlderNewer