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
config_version = /usr/bin/git --git-dir /etc/puppet_[name]/.git describe --long |
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
import time | |
import datetime | |
from OpenSSL import crypto as c | |
from checks import AgentCheck | |
class SSLCheckExpireDays(AgentCheck): | |
def check(self, instance): | |
metric = "ssl.expire_in_days" | |
certfile = instance['cert'] | |
cert_tag = 'cert:%s' % (certfile.split('/')[-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
SELECT CONCAT(table_schema, '.', table_name), | |
CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, | |
CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, | |
CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, | |
CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, | |
ROUND(index_length / data_length, 2) idxfrac | |
FROM information_schema.TABLES | |
ORDER BY data_length + index_length DESC | |
LIMIT 20; |
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
docker run -e --user=apache -i -t -w /var/www/ --volumes-from PROJECTNAME_PROJECTNAME_1 --link channelone_db_1:db_1 docker.io/avatarnewyork/dockerenv-apache:php56 docker-umask-wrapper.sh /.composer/vendor/wp-cli/wp-cli/bin/wp --allow-root --path=/var/www/html user create admin myemail@myhost.com --role=administrator |
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
C-x r t - insert char on entire selection | |
M-$ - flyspell the word the cursor is on (or near) | |
M-v - page up | |
X-m - smerge-mode (syntax highlight git merge conflicts) | |
(set-face-attribute 'default nil :height 100) - increase font size | |
prepend string - entire region | |
`M-x string-insert-rectangle RET` |
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
mysql -N -uroot -e 'show tables like "wp\_%"' mydb | xargs mysqldump -uroot mydb > /tmp/wp_tables_prod.20161028.sql |
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
# Check the diff between branches | |
git diff release-v2.0.0..Develop public/wp-content/themes/mytheme/my-page.php | |
# revert single file from specific commit | |
git checkout 26608ec4a393b0086e02851b6d6f6b72af265a67 public/wp-content/themes/mytheme/my-page.php | |
# commit (the diff won't show until it's commited) | |
git commit | |
# re-diff file (will show no diff) |
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
;;; auto-rsync-mode -- minor mode for auto rsync | |
;; | |
;; Author: @l3msh0 | |
;; | |
;;; Example | |
;; | |
;; (require 'auto-rsync) | |
;; (auto-rsync-mode t) | |
;; (setq auto-rsync-dir-alist |
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 - | |
#====================================================================================================================== | |
# vim: softtabstop=4 shiftwidth=4 expandtab fenc=utf-8 spell spelllang=en cc=120 | |
#====================================================================================================================== | |
# | |
# FILE: bootstrap-salt.sh | |
# | |
# DESCRIPTION: Bootstrap salt installation for various systems/distributions | |
# | |
# BUGS: https://github.com/saltstack/salt-bootstrap/issues |
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
http://ltiapps.net/test/tc.php http://ltiapps.net/test/tp.php |
NewerOlder