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
mysql> select html_decode('This & that!'); | |
+---------------------------------+ | |
| html_decode('This & that!') | | |
+---------------------------------+ | |
| This & that! | | |
+---------------------------------+ | |
1 row in set (0.00 sec) |
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
#!/bin/bash | |
FAIL=0 | |
LOG=log.txt | |
ERROR_LOG=messages.txt | |
GENERATORS=("FILE_1" "FILE_2") | |
echo "===> Truncating logs" | |
rm -f $LOG | |
rm -f *_$ERROR_LOG |
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
#!/bin/bash | |
cat /etc/passwd | sed -e "s/\([^:]\+\).*/\1/" | xargs -I user bash -c "echo user && su user -c \"crontab -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
# Login and authenticate | |
from xmlrpclib import ServerProxy | |
p = ServerProxy('http://USERNAME:PASSWORD@trac/storm/login/rpc') | |
# Query tickets and print out the results | |
for i in p.ticket.query('owner=eric&status!=closed'): | |
p.ticket.get(i) | |
# What ticket attributes are available to pass to the attributes struct? | |
p.ticket.getTicketFields() |
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 beta -type f -name \*.yaml | xargs -I file echo file | sed "s/\(\([a-zA-Z\_]\+\)\/\([a-zA-Z\_]\+\).*\)/kwalify -lf \1 \3\/\2.yaml/" | sh && e=$(find beta -type f -name \*.yaml | xargs -I file echo file | sed "s/\(\([a-zA-Z\_]\+\)\/\([a-zA-Z\_]\+\).*\)/kwalify -lf \1 \3\/\2.yaml/" | sh ) && echo $e | grep -v INVALID |
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
/* | |
Our runner script | |
*/ | |
CREATE PROCEDURE inner_sp AS | |
EXEC dbo.usp_RecordChangeScript '2007-01-2012 (ERIC TEST).sql', '0.1.11' | |
EXEC dbo.usp_RecordChangeScript '2004-01-2012 (ERIC TEST).sql', '0.1.11' | |
-- CODE GOES HERE | |
GO |
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
git archive --format=zip --remote=git@git:project.git master some/path other/path -o whatever.zip |
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
param ( | |
[string]$test, | |
$buildArgs | |
) | |
echo $buildArgs.test | |
./build2.ps1 @buildArgs |
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
task :hasclass => :environment do | |
class_name = false | |
if ENV['class'] | |
class_name = ENV['class'] | |
end | |
NodeClassMembership.find(:all, :include => [:node_class],:conditions => { | |
:node_classes => { :name => class_name } | |
}).each do |node| |
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
# rename the computer (and reboot) | |
runas /user:Administrator "netdom renamecomputer \"%COMPUTERNAME%\" /Newname \"EricTest\" /force /reboot 0" | |
# restart computer NOW | |
shutdown /r /t 0 |