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
namespace :responsys do | |
desc 'download and import Responsys events from FTP' | |
task load: :environment do | |
Resque.enqueue(LoadEventsJob) | |
end | |
Our Fields, unique key | |
RIID, (CUSTOMER_ID_, EMAIL_) | |
RIID, (CUSTOMER_ID_, EMAIL_) |
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
imgs=`find . -name \*.jpg | head -5` | |
img_args=$(for i in $imgs; do echo -n " -a $i "; done) | |
echo $'Hey Grandpa, \nI wrote a computer program to send you 5 pictures of Ari everyday until you\'re caught up. \nI think it\'s more fun to get 5 a day then to get them all at once.\nSorry you weren\'t on the list to begin with.' | \ | |
mutt -s "Daily Ari Photos" $img_args -- [email protected] [email protected] | |
for i in $imgs; do | |
mv $i sent | |
done |
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
common: &common | |
adapter: postgresql | |
encoding: unicode | |
pool: 5 | |
username: stitchfix_owner | |
password: stitchfix_owner | |
host: localhost | |
min_messages: warning | |
development: |
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
feature 'logged-in homepage', js: true do | |
# AWFUL HACK SO THAT WE DON'T GO INTO THE NEW VIEW AUTOMATICALLY | |
# IF THIS ISN'T HERE (TRY IT!), THE LOGIN TAKES THE USER TO THE | |
# /SHIPMENTS/SCHEDULE AUTOMATICALLY, WHICH THEN CALLS BRAINTREE FOR | |
# SOME INFORMATION. WE DON'T CARE ABOUT THAT YET, SO I AM BLOCKING IT | |
# OUT. WE WILL CARE ABOUT IT SOMEDAY SOON. | |
before :all do | |
@old_shipment = ShipmentsController |
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
backup-sys () | |
{ | |
sudo tar cvfJ backup.tar.xz --exclude={/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,/media/*,/lost+found,/data} /; | |
gpg --encrypt --recipient "Joe Cannatti" backup.tar.xz; | |
mv backup.tar.xz.gpg dropbox/Dropbox/; | |
rm -rf backup.tar.xz | |
} |
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
Ruby is a complex programming language. It’s power comes from the richness and flexibility of the language’s features. | |
There’s so many cool and interesting bits to ruby, that sometimes we don’t take the time to fully grok them all. | |
It’s possible to use a Ruby feature everyday, but not really understand how it works. | |
In this talk, we’ll dig deep into 5 of the most commonly misunderstood aspects of programming in Ruby. | |
Geared mostly towards newer Ruby devs, but there’ll certainly be something for everyone! | |
* Code evaluation time | |
* Methods called while defining a class (attr_accessor, has_many, etc) |
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 log | grep ^Author | awk '{print $NF}' | sort | uniq -c | sort | awk "{print (\$1/$(git log | grep ^Author | wc -l)) \" \" \$2 |
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
<h1>Test</h1> | |
<? echo strlen($_GET["name"]) ?> |
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
<h1>Test1</h1> | |
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script> | |
<textarea style="width: 500px; height: 500px;"> | |
</textarea> | |
<a href="#">Test1</a> | |
<script> | |
$("a").click(function(e){ | |
var test = "?name="; | |
for(var i=0; i<8155; i++){ |
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
select COALESCE(a.num + b.num + c.num + d.num, 0) as total, channels.id as master_channel_id | |
from channels | |
left join | |
(select name, channels.id as channel_id, count(*) as num from channels | |
join `simple_discussions` on simple_discussions.channel_id = channels.id | |
where simple_discussions.created_at >= '2013-01-01' and simple_discussions.created_at <= '2013-12-30' | |
group by channels.id) as a on a.channel_id = channels.id | |
left join | |
(select name, channels.id as channel_id, count(*) as num from channels | |
join `video_attachments` on video_attachments.channel_id = channels.id |