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
| docker run \ | |
| --name {{printf "%q" .Name}} \ | |
| {{- with .HostConfig}} | |
| {{- if .Privileged}} | |
| --privileged \ | |
| {{- end}} | |
| {{- if .AutoRemove}} | |
| --rm \ | |
| {{- end}} | |
| {{- if .Runtime}} |
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
| ^[[31m`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*^[[0m | |
| ^[[33m^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`^[[0m | |
| ^[[32m'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,^[[0m ,---/V\ | |
| ^[[34m*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^^[[0m ~|__(o.o) | |
| ^[[35m,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.,*'^`*.^[[0m U U U U | |
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
| from datetime import date | |
| import time | |
| import calendar | |
| def ro_friday(): | |
| date_today=date.today() | |
| if calendar.day_name[date_today.weekday()] == 'Friday': | |
| print '\t __' | |
| print '\t/ \ _________________ ' | |
| print '\t| | / \ ' |
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
| openssl x509 -noout -modulus -in certificate.crt | openssl md5 | |
| openssl rsa -noout -modulus -in privateKey.key | openssl md5 | |
| openssl req -noout -modulus -in CSR.csr | openssl md5 |
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
| RewriteCond %{HTTP:X-Forwarded-Protocol} !^https$ | |
| RewriteRule ^some/url/(.*)$ https://%{HTTP_HOST}/some/url/$1 [L] |
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
| <Files wp-login.php> | |
| Order deny,allow | |
| Deny from all | |
| #Single IP | |
| SetEnvIF X-Forwarded-For "x.x.x.x" AllowIP | |
| #IP Range (example for a XXX.XXX.0.0/16) | |
| # http://stackoverflow.com/questions/17967294/how-can-i-make-a-regular-expression-for-ip-address-with-subnetmask | |
| SetEnvIF X-Forwarded-For "^XXX\.XXX\.(?:[0-9]{1,2}|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.(?:[1-9][0-9]?|1[0-9]{2}|2[0-4][0-9]|25[0-4])$" AllowIP |
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
| ALTER TABLE TABLE_NAME | |
| REORGANIZE PARTITION pmax INTO ( | |
| PARTITION p201401 VALUES LESS THAN ('2014-01-01 00:00:00'), | |
| PARTITION p201402 VALUES LESS THAN ('2014-02-01 00:00:00'), | |
| PARTITION p201403 VALUES LESS THAN ('2014-03-01 00:00:00'), | |
| PARTITION p201404 VALUES LESS THAN ('2014-04-01 00:00:00'), | |
| PARTITION p201405 VALUES LESS THAN ('2014-05-01 00:00:00'), | |
| PARTITION p201406 VALUES LESS THAN ('2014-06-01 00:00:00'), | |
| PARTITION p201407 VALUES LESS THAN ('2014-07-01 00:00:00'), | |
| PARTITION p201408 VALUES LESS THAN ('2014-08-01 00:00:00'), |
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
| <Files wp-login.php> | |
| order deny,allow | |
| Deny from all | |
| # Allow from this IP address | |
| allow from x.x.x.x | |
| </Files> |
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
| find . -name "*.gz" | perl -pi -e 's/\.gz$//g;' | awk '{printf("gunzip %s.gz && bzip2 %s\n",$1,$1)}' | csh |
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
| import Gmetric | |
| def send_gmetric_data(metric_name,metric_value,metric_group): | |
| parser = optparse.OptionParser() | |
| #gmond configuration | |
| options = {} | |
| options['host'] = "your_server" | |
| options['protocol'] = "udp" | |
| options['port'] = 8649 |
NewerOlder