Skip to content

Instantly share code, notes, and snippets.

@dgalarza
dgalarza / gist:3248130
Created August 3, 2012 14:28 — forked from rowan-m/gist:1026918
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself
@dgalarza
dgalarza / notes.md
Created July 25, 2012 19:42 — forked from searls/notes.md
Stack traces I get when I attempt to install native Ruby extensions on OS X 10.8 Mountain Lion Developer Preview

Trying to make my Ruby environment happy under OS X 10.8 Mountain Lion

A few notes. I had:

  • installed XCode 2.4 Preview as well as its command line tools (which are found separately in Preferences -> Downloads)
  • updated rvm (rvm get latest)

and my issue was:

  • system ruby installed every gem with native extensions I threw at it
@dgalarza
dgalarza / scheduled_job.rb
Created July 17, 2012 20:23 — forked from kares/scheduled_job.rb
Recurring Job using Delayed::Job
#
# Recurring Job using Delayed::Job
#
# Setup Your job the "plain-old" DJ (perform) way, include this module
# and Your handler will re-schedule itself every time it succeeds.
#
# Sample :
#
# class MyJob
# include Delayed::ScheduledJob
@dgalarza
dgalarza / gist:3040209
Created July 3, 2012 14:51 — forked from lusis/gist:1047214
update jenkins Updatecenter from CLI
$ java -jar jenkins-cli.jar -s http://localhost:9000 install-plugin findbugs
findbugs is neither a valid file, URL, nor a plugin artifact name in the update center
No update center data is retrieved yet from: http://updates.jenkins-ci.org/update-center.json
findbugs looks like a short plugin name. Did you mean 'null'?
# Specifying a full URL works!
$ java -jar jenkins-cli.jar -s http://localhost:9020 install-plugin http://updates.jenkins-ci.org/download/plugins/AdaptivePlugin/0.1/AdaptivePlugin.hpi
# Get the update center ourself
## /config/initializers/dynamic_job.rb
require 'heroku'
# base class for all jobs that you wish to automatically scale and go down in Heroku
class DynamicJob
#set a cap on maximum number of users ever - just in case.
MAX_CONCURRENT_WORKERS = 100
def initialize
@dgalarza
dgalarza / log.js
Created April 9, 2010 21:29 — forked from afahy/log.js
// allows you to log an object while staying in the chain
(function($){
var console = ("console" in window) ? window.console : { "log": alert, "dir": alert };
$.extend($.fn, {
log: function(){
console.log(this);
return this;
},