Skip to content

Instantly share code, notes, and snippets.

@jedi4ever
jedi4ever / gist:898114
Created April 1, 2011 13:06
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
@jedi4ever
jedi4ever / gist:903711
Created April 5, 2011 14:36
Homebrew formula for rpmbuild
# Get nss formula
cd /usr/local/Library/Formula/
wget https://github.com/mbrunthaler/homebrew/raw/aa99a2c340bc81f3cb63fb14f35f7f3cc850769d/Library/Formula/nss.rb nss.rb
brew install libmagic
brew install nss (zie gist)
brew install popt
brew install nspr
brew install berkeley-db
brew install lua
@jedi4ever
jedi4ever / gist:903751
Created April 5, 2011 14:51
Tuning stuff for Ubuntu hosts
# /etc/security/limits.conf
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
===========================================================
# /etc/sysctl.conf
# sysctl for maximum tuning
@jedi4ever
jedi4ever / gist:906286
Created April 6, 2011 19:02
AMI key/value attributes - Ubuntu
>> AWS.images.get("ami-cef405a7")
<Fog::AWS::Compute::Image
id="ami-cef405a7",
architecture="x86_64",
block_device_mapping=[{"snapshotId"=>"snap-e3f1218e", "deviceName"=>"/dev/sda1", "deleteOnTermination"=>"true", "volumeSize"=>8}],
description=nil,
location="099720109477/ebs/ubuntu-images/ubuntu-maverick-10.10-amd64-server-20101225",
owner_id="099720109477",
state="available",
type="machine",
@jedi4ever
jedi4ever / gist:909825
Created April 8, 2011 13:26
Mccloud v0.11 - Vagrant for the cloud - Transcript
falcon-pdb patrick$ mkdir mccloud-test
falcon-pdb patrick$ cd mccloud-test
falcon-pdb:mccloud-test patrick$ gem install mccloud
Fetching: net-ssh-2.1.4.gem (100%)
Fetching: net-scp-1.0.4.gem (100%)
Fetching: builder-3.0.0.gem (100%)
Fetching: excon-0.6.1.gem (100%)
Fetching: formatador-0.1.3.gem (100%)
Fetching: json-1.5.1.gem (100%)
@jedi4ever
jedi4ever / pom.xml
Created April 13, 2011 08:30
using fat-32 lib: create a new floppy img from all files in a directory (non recursive)
package be.jedi.dir2floppy;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;
import de.waldheinz.fs.FileSystem;
import de.waldheinz.fs.FsDirectoryEntry;
mcclouddevelopmentpatrickmcollectivestack - ROLLBACK_COMPLETE
-- Timestamp: Wed Apr 13 13:23:14 UTC 2011
-- LogicalResourceId: mcclouddevelopmentpatrickmcollectivestack
-- ResourceType: AWS::CloudFormation::Stack
-- ResourceStatus: ROLLBACK_COMPLETE
--
-- Timestamp: Wed Apr 13 13:23:11 UTC 2011
-- LogicalResourceId: ActiveMQSecurityGroup
-- ResourceType: AWS::EC2::SecurityGroup
-- ResourceStatus: DELETE_COMPLETE
@jedi4ever
jedi4ever / gist:919065
Created April 14, 2011 07:27
AWS Cloudfront : Remarks - Suggestions - Observations

Cloudformation remarks:

  • Idempotent (Re-run of Stack creation) : Currently you can only create/delete a stack. If part of the create fails, default is to rollback all. You can adjust that, but I found no way to re-run the create so that it would create the missing pieces. Also if you destroy an instance by hand, this would come in handy to rebuild part of the stack
  • Slowness: the creation process on paper look as if the dependencies are handled intelligently and possible speedier. I found creating individual instances in parallel faster than creating them in a stack
  • Throttling limit: if you delete, create stack again (f.i. because it failed), I often get errors for throtling limit. I think this limit is not imposed on the regular creation of instances.
  • If a creation fails, you have to delete the stack first. Maybe you need another state, so you don't need to delete it first (like state-terminated)
  • Name limit: this only accepts alphanum , no spaces or dashes to make it more readable in the console.
@jedi4ever
jedi4ever / ruby-1.9.2-to-deb.sh
Created April 14, 2011 11:21 — forked from jtimberman/gist:881058
Ruby 1.9 fp- bash
#!/usr/bin/env bash
sudo apt-get install libssl-dev
sudo gem install fpm
wget ftp://ftp.ruby-lang.org//pub/ruby/1.9/ruby-1.9.2-p180.tar.gz
tar -zxvf ruby-1.9.2-p180.tar.gz
cd ruby-1.9.2-p180
time (./configure --prefix=/usr && make && make install DESTDIR=/tmp/installdir)
cd ..
@jedi4ever
jedi4ever / gist:919537
Created April 14, 2011 14:05
buiding sphinx .deb with fpm
wget http://sphinxsearch.com/files/sphinx-0.9.9.tar.gz
rm -rf sphinx-0.9.9
tar -xzvf sphinx-0.9.9.tar.gz
cd sphinx-0.9.9
./configure --with-pgsql --without-mysql --prefix=/usr
rm -rf /tmp/install-sphinx-0.9.9
mkdir /tmp/install-sphinx-0.9.9
make install DESTDIR=/tmp/install-sphinx-0.9.9
# We need to specify the arch as it not picked up automagically