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
# set -e | |
# if set -e was actually set, the first time the -f command | |
# returns non-zero, the entire program would exit with the return code | |
# from the ssh command. DO NOT WANT | |
while true | |
do | |
retval=`ssh [email protected] "ls -1 $src_dir/nz_${DOMAIN}_done.flag 2>/dev/null|wc -l"` | |
if [[ $retval -eq 0 ]] | |
then |
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
Command Substitution | |
Command substitution allows the output of a command to replace the command name. There are two forms: | |
$(command) | |
or | |
`command | |
Bash performs the expansion by executing command | |
$(cat file) can be replaced by the equivalent but faster $(< file). |
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
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/lib/chef/json_compat.rb | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/lib/chef/knife.rb | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/lib/chef/version_class.rb | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/lib/chef.rb | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/bin/chef-client | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/bin/chef-solo | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/bin/knife | |
^[[36m192.168.1.5^[[0m /var/lib/gems/1.8/gems/chef-0.10.8/bin/shef | |
^[[36m192.168.1.5^[[0m /usr/local/bin/chef-client | |
^[[36m192.168.1.5^[[0m /usr/local/bin/chef-solo |
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
for d in `find -type d -name '.git'`; do pushd $d/.. > /dev/null; if [ 0 -ne `git st --short|wc -l` ]; then echo "Need to commit $d"; fi; popd > /dev/null; done |
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
High-Memory Instances | |
Instances of this family offer large memory sizes for high throughput applications, including database and memory caching applications. | |
High-Memory Extra Large Instance | |
17.1 GiB of memory | |
6.5 EC2 Compute Units (2 virtual cores with 3.25 EC2 Compute Units each) | |
420 GB of instance storage | |
64-bit platform |
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
#!/usr/bin/ruby | |
require 'rubygems' | |
gem 'chef', ">= 0" | |
require 'chef/role' | |
if 1 != ARGV.length then | |
print "Please specify a role name or path to it's ruby file\n" | |
exit | |
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
mroddy@mroddy-local-vm:~/code/mhc/web$ git diff | |
diff --git a/web/mhc/tests/__init__.py b/web/mhc/tests/__init__.py | |
index b8b1956..0e1d260 100644 | |
--- a/web/mhc/tests/__init__.py | |
+++ b/web/mhc/tests/__init__.py | |
@@ -278,7 +278,7 @@ class TestController(MortarTestCase): | |
# setup the context object for our tests | |
self.c = ContextObj() | |
- self.c.features = feature_flags.get_feature_flags(None, config['feature_flags']) |
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
mroddy@mroddy-local-vm:~$ python somenums.py | |
range+for_loop time: 16.0733070374 | |
xrange+sum time: 6.43176913261 |
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
mroddy@mroddy-local-vm:~$ python sumnums.py | |
Traceback (most recent call last): | |
File "sumnums.py", line 19, in <module> | |
x = sum(xrange(sys.maxint+1, sys.maxint+100000000)) | |
OverflowError: Python int too large to convert to C 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
last_segment_per_sessionId = FOREACH gpv_sessionized GENERATE | |
FLATTEN(group) AS sessionId, | |
MAX(pv_sessionized.time) AS max_time; | |
OlderNewer