Skip to content

Instantly share code, notes, and snippets.

View noahd1's full-sized avatar

Noah Davis noahd1

  • Code Climate
  • New York, NY
View GitHub Profile
start = 9300
total = 10460
index = 0
failures = Resque::Failure.all(start, total - start);nil
failures.each do |failure|
index += 1
if failure["payload"]["class"] == "SendWeeklySummary" && failure["retried_at"].nil?
Resque::Failure.requeue(index + start - 1)
end
end;nil
class DeleteDatabase < ActiveRecord::Migration
def self.up
execute <<-SQL
DROP DATABASE weplay_production;
SQL
end
def self.down
puts 'see manual'
end
class Aborted < ActiveRecord::Migration
def self.up
puts <<-END
Rake aborted! Problems connecting to redis on port 3345.
Sys/log error 4455
Ran out of file descriptions. Please install rootkit.
END
end
## assume a flushed memcache database
## and Sport.rb which has a cache-money index on :name
class Sport < ActiveRecord::Base
is_cached :repository => $cache
# This configuration enables calls to Sport.find_by_name("baseball") to come from and be written to a cache
index :name
== Welcome to Redis 1.2.2 ==
Hello, 1.2.2 is a bugfix release, fixing a problem with BGSAVE and BGREWRITEAOF
copy-on-write semantics. This version of Redis will use a lot less CPU and
memory while performing a BGSAVE and BGREWRITEAOF operation.
It is very important to upgrade ASAP to this version if you are using Redis
with data persistence via snapshotting or append only file.
Another minor change is that the INFO command will now have a new field showing
static void segvHandler(int sig, siginfo_t *info, void *secret) {
void *trace[100];
char **messages = NULL;
int i, trace_size = 0;
unsigned long offset=0;
ucontext_t *uc = (ucontext_t*) secret;
sds infostring;
REDIS_NOTUSED(info);
redisLog(REDIS_WARNING,
// add move event listener
tableview.addEventListener('move',function(e)
{
Titanium.API.info("MOVE EVENT!");
//clearTimeout(updateGroupOrder); // does not work, actually triggers the call
var _this = this;
updateGroupsFx = function() {
Titanium.API.info("UPDATE GROUPS!");
for(var i = 0; i < _this.data.length; i++) {
Titanium.API.info("index at " + i + ": " + _this.data[i].title);
Titanium.UI.setBackgroundColor('#000');
// create tab group
var tabGroup = Titanium.UI.createTabGroup();
//
// create base UI tab and root window
//
var win = Titanium.UI.createWindow({ });
var data = [
Titanium.UI.setBackgroundColor('#000');
var tabGroup = Titanium.UI.createTabGroup();
var win2 = Titanium.UI.createWindow({
title:'Tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
icon:'KS_nav_ui.png',