Skip to content

Instantly share code, notes, and snippets.

View AlejandroJL's full-sized avatar

Alejandro Julián López Rodríguez AlejandroJL

View GitHub Profile
unless ARGV[0].nil?
File.open(ARGV[0],'r').each do |line|
line.gsub!(/\(|\)|,/,'')
versions = line.split
gem_name = versions.shift
versions.each do |version|
puts "gem install #{gem_name} -v=#{version} --ignore-dependencies"
system("gem install #{gem_name} -v=#{version} --ignore-dependencies")
@karmi
karmi / downloads_counter_sorted_sets.sh
Created May 16, 2011 11:47
Counters with Redis Sorted Sets
# ===============================
# Counters with Redis Sorted Sets
# ===============================
redis-cli DEL downloads:total downloads:total:today downloads:files:total downloads:files:2011-05-10
# --------------
# STORING COUNTS
# --------------
# On each hit for file, do this:
@vortizhe
vortizhe / rawclone.rb
Created July 18, 2011 11:28 — forked from littlemove/rawclone.rb
Reads a file with the output from gem list and installs the gems
#! /usr/bin/ruby
# So you want to start developing an already "woking" project. No
# bundle, config.gem's not present or messing up dependencies. Fear
# not!
# Do a "gem list" wherever the project is already working
# (production?, some colleage machine?). Make a file with this format:
#
# chronic (0.2.3)
# colored (1.1)
@msmith
msmith / couchdb-ec2-install.sh
Created August 25, 2011 17:26
Set up CouchDB on EC2
#!/bin/bash
#
# This script installs and configures couchdb on a fresh Amazon Linux AMI instance.
#
# Must be run with root privileges
# Tested with Amazon Linux AMI release 2011.02.1.1 (ami-8c1fece5)
#
export BUILD_DIR="$PWD"
@agirorn
agirorn / cucumber_step_that_needs_to_run_slowly.rv
Created August 29, 2011 18:51
Control the speed of Capybara Selenium from the cucumber
When /^I drag a tree node somewhere that results in a lot of ajax calls$/ do
tree_node = page.find('#tree_node_1')
drop_spot = page.find('#drop_spot')
delay_capybara do
tree_node.drag_to(drop_spot)
end
end
@incanus
incanus / Xcode4TestFlightintegration.sh
Created September 1, 2011 19:12
Xcode 4 scheme Archive step Post-script for automatic TestFlight build uploading. See the blog post here: http://developmentseed.org/blog/2011/sep/02/automating-development-uploads-testflight-xcode
#!/bin/bash
#
# (Above line comes out when placing in Xcode scheme)
#
API_TOKEN=<TestFlight API token here>
TEAM_TOKEN=<TestFlight team token here>
SIGNING_IDENTITY="iPhone Distribution: Development Seed"
PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision"
#LOG="/tmp/testflight.log"
@touv
touv / startup-app.sh
Created November 4, 2011 13:16
Startup script for Express / Node.js application with the forever module
#!/bin/sh
##3.5...10...15...20...25...30...35...40...45...50...55...60...65...70...75...80
##
## Debian / Linux / Ubuntu / LSB
## Startup script for Express / Node.js application with the forever module
##
##
## A modification of "init.d.lsb.ex" by Nicolas Thouvenin
##
##
@saetia
saetia / gist:1623487
Last active July 16, 2024 05:56
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@chriseidhof
chriseidhof / nsincrementalstore.markdown
Created February 18, 2012 16:39
Accessing an API using CoreData's NSIncrementalStore

Accessing an API using CoreData's NSIncrementalStore

Note: the original location of this article is on my blog, however, it is posted here too for better readability.

In this article, we will see how to use Core Data for accessing your API. We will use the Bandcamp API as our running example. I've only been experimenting with this code for a few days, so there might be mistakes in there.

@tommeier
tommeier / rsync_backup.sh
Created March 20, 2012 00:05
RSync backup script for Mac OSX from External drive
#!/bin/sh
echo "Running..."
PROG=$0
RSYNC="/usr/bin/rsync"
SCRIPT_MOUNTED='false'
MOUNT_VOLUME="/Volumes/Qdownload"
SRC="$MOUNT_VOLUME/transmission/completed/"
DST="/Users/tom/Dumping Ground/Qnap Downloads"