This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0. SSH to server | |
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml | |
2. set userSecurity to false: <userSecurity>false</userSecurity> | |
3. delete | |
<authorizationStrategy> and <securityRealm> | |
4. /etc/init.d/bitnami restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# In response to: | |
# http://mlomnicki.com/ruby/tricks-and-quirks/2011/02/10/ruby-tricks2.html | |
# Ruby 1.9.2 has some neat stuff that lets us make a readable | |
# alternative case statement that calls each method in turn. | |
# 1.9.2 features used: | |
# * hashes are ordered in 1.9.2 | |
# * cool JSON-style hash syntax | |
# * concise lambda syntax |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlibc zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz | |
tar -xvzf ruby-1.9.3-p125.tar.gz | |
cd ruby-1.9.3-p125/ | |
./configure --prefix=/usr/local | |
make | |
make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "Installing ctags" | |
sudo apt-get install exuberant-ctags | |
DOTVIM="$HOME/.vim" | |
JQUERY=12276 | |
if [ ! -e `which git` ] | |
then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
if __FILE__ == $0 | |
puts "Run with: watchr #{__FILE__}. \n\nRequired gems: watchr rev" | |
exit 1 | |
end | |
class Specs | |
class << self | |
def run(cmd) | |
sleep(2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
class Pather | |
def initialize(input) | |
@input = input.split("\n") | |
end | |
def output | |
x1 = nil | |
@input.each do |line| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# call like this on the target server: | |
# NODENAME='foo' CHEF_ENV='production' RUNLIST='["role[foo]","recipe[bar]"]' CHEFREPO='[email protected]:repo.git' bash <( curl -L https://raw.github.com/gist/1026628 ) | |
# You will need to ensure that the ssh key is already set up on the server. | |
set -e | |
export CHEF_DIR="${HOME}/chef" | |
sudo rm -rf $CHEF_DIR | |
mkdir -p "$CHEF_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add pg ppa to your respository list; go here: http://www.postgresql.org/download/ | |
# For ubuntu percise (12.04) | |
# Add the file: /etc/apt/sources.list.d/pgdg.list and in it add: | |
deb http://apt.postgresql.org/pub/repos/apt/ YOUR_UBUNTU_VERSION_HERE-pgdg main | |
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://jsfiddle.net/gmhawash/6FT8T/ | |
How about doing something like this? I've made it from scratch... | |
What I've done is used 2 tables, one for header, which will be static always, and the other table renders cells, which I've wrapped using a div element with a fixed height, and to enable scroll, am using overflow-y: auto; | |
Also make sure you use table-layout: fixed; with fixed width td elements so that your table doesn't break when a string without white space is used, so inorder to break that string am using word-wrap: break-word; | |
<html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ruby 1.9 supports 4 ways to call a proc! ex: f =->n {[:hello, n]}; f[:ruby]; f.call(:ruby); f.(:ruby) | |
# | |
# turns out, you can also call a proc via proc === :arg -- which means you can use proc's in when clauses! | |
# ruby doc: http://ruby-doc.org/ruby-1.9/classes/Proc.html#M001165 | |
# | |
# ... kudos to @chadfowler for the tip! | |
# | |
# (note: works on 1.8.7 as well :-)) | |
def am_i_awesome? |
OlderNewer