Skip to content

Instantly share code, notes, and snippets.

View juliamae's full-sized avatar

Julia Valentine juliamae

View GitHub Profile
@juliamae
juliamae / RESQUE_REMOVE_DUPLICATES.md
Last active September 29, 2018 00:31 — forked from rafaelgaspar/RESQUE_REMOVE_DUPLICATES.md
Remove duplicate jobs from a Resque queue.

remove_duplicates.rb

Remove duplicate Resque jobs that have already been queued for processing.

Execute

To run this against a Rails installtion in production use the following command: bundle exec rails runner -e production /path/to/script/remove_duplicates.rb. See rails runner for more information.

Notes

@juliamae
juliamae / gist:753311
Created December 23, 2010 18:01 — forked from luke0x/gist:115795
Deploying a Rails 3 App with EC2 + S3 + Ubuntu + Capistrano + Passenger
Deploying a Rails 3 App with EC2 + S3 + Ubuntu + Capistrano + Passenger
=======================================================================
EC2 Setup
---------
1 Launch New ec2 instance - ami-1634de7f
2 Create elastic IP [ELASTIC_IP] and associate it with instance
3 go to domain registrar DNS settings, @ and www to ELASTIC_IP
4 set the `:host` in `config/deploy.rb` to ELASTIC_IP
@juliamae
juliamae / gist:661838
Created November 3, 2010 22:35 — forked from jcbozonier/gist:131289
markov chains in python
from __future__ import with_statement
import random
def create_chain(file_paths):
word_counter = {}
previous_word = ""
for path in file_paths:
with open(path) as file:
for line in file:
words = line.split(" ")