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
yum install -y pycairo mod_python Django python-ldap python-memcached python-sqlite2 \ | |
bitmap bitmap-fonts python-devel python-crypto pyOpenSSL zope gcc django-taggin | |
yum install python-Twisted <- fpm build | |
yum install pythin-pip <- fpm | |
test: | |
yum install python-carbon python-whisper python-graphite-conf | |
cd /opt/graphite/conf |
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
What do I want to do? | |
- Managed cronjobs via Version Control | |
- Get better reporting on the jobs | |
- Not get spammed by cron emails | |
What do I want to know about cronjobs? | |
- Did the command fail? | |
- Did the command actually 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
tcsh: | |
alias cwdcmd "if (-e README) cat README fi" | |
bash: | |
PROMPT_COMMAND="[[ -e README ]] && cat README" |
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 | |
# | |
# MYNAME DESCRIPTION | |
# | |
# chkconfig: 345 95 5 | |
# description: DESCRIPTION | |
# | |
### BEGIN INIT INFO | |
# Provides: NAME |
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 | |
FPM=/usr/bin/fpm | |
if [ ! -d BUILD ] | |
then | |
mkdir -p BUILD | |
fi | |
for gem in `cat gem-list | grep -v "#" ` |
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
class Player | |
def play_turn(warrior) | |
@warrior = warrior | |
@health ||= warrior.health | |
@direction ||= :forward | |
attack || look || retreat || wall || captive || rest || walk | |
@health = warrior.health | |
end |
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
Example of getting size of fields: | |
SELECT id, length(raw), length(cooked) FROM posts ORDER BY length(cooked) DESC limit 100; | |
Truncate table: | |
truncate table <table>; | |
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
logstash(search) - hits for search string | |
logstash(search,field,facet) - return stats on a field - facets are count, min, max, total, mean. | |
logstashGroup(search, group, field, facet) - return stats on a field, grouped by a value. |
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
In [1]: import salt.config | |
In [2]: import salt.loader | |
In [3]: import salt.renderers.yaml | |
In [4]: | |
In [4]: content = open('test.sls').read() |
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 sys | |
import os | |
import salt.config | |
import salt.loader | |
import salt.utils | |
__opts__ = salt.config.minion_config('/etc/salt/minion') | |
__salt__ = salt.loader.minion_mods(__opts__) | |
statemods = salt.loader.states(__opts__, __salt__) | |
print sorted(list(statemods.keys())) | |
>>> ['alias.absent', 'alias.present', 'alternatives.auto', 'alternatives.install', 'alternatives.remove', 'alternatives.set', 'apache.configfile', 'archive.closing', 'archive.extracted', 'at.absent', 'at.present', 'blockdev.formatted', 'blockdev.tuned', 'boto_asg.absent', 'boto_asg.present', 'boto_cloudwatch_alarm.absent', 'boto_cloudwatch_alarm.present', 'boto_elasticache.absent', 'boto_elasticache.present', 'boto_elb.absent', 'boto_elb.present', 'boto_iam_role.absent', 'boto_iam_role.present', 'boto_lc.absent', 'boto_lc.present', 'boto_route53.absent', 'boto_route53.present', 'boto_secgroup.absent', 'boto_secgroup.present', 'boto_sqs.absent', 'boto_sqs.present', 'buildout.installed', 'cloud.absent', 'cloud.present', 'cloud.profile', 'cloud.volum |
OlderNewer