Skip to content

Instantly share code, notes, and snippets.

View julienXX's full-sized avatar

Julien Blanchard julienXX

View GitHub Profile
@julienXX
julienXX / .bashrc
Created May 25, 2009 12:42
My .bashrc
# Colors ----------------------------------------------------------
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;32'
export CLICOLOR=1
alias ls='ls -G' # OS-X SPECIFIC - the -G command in OS-X is for colors, in Linux it's no groups
#alias ls='ls --color=auto' # For linux, etc
@julienXX
julienXX / .bash_profile
Created May 25, 2009 12:43
my .bash_profile
# See following for more information: http://www.infinitered.com/blog/?p=19
# Path ------------------------------------------------------------
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/mysql/bin:$PATH # OS-X Specific, with MacPorts and MySQL installed
#export PATH=/opt/local/bin:/opt/local/sbin:$PATH # OS-X Specific, with MacPorts installed
if [ -d ~/bin ]; then
export PATH=:~/bin:$PATH # add your bin folder to the path, if you have it. It's a good place to add all your scripts
fi
@julienXX
julienXX / update_google_chrome.sh
Created June 4, 2009 15:02 — forked from joefiorini/update_google_chrome.sh
Retrieve current Chromium build for Mac OS X
#!/bin/bash
set -e
BUILD_URL='http://build.chromium.org/buildbot/snapshots/chromium-rel-mac/'
update_google_chrome() {
get_latest_revision_number
download_latest_revision
extract_code
@julienXX
julienXX / gist:151289
Created July 21, 2009 11:11
empty an openLDAP group
./smbldap-groupshow.pl group_name | grep memberUid | cut -d" " -f2 | sed 's/user_to_keep_in\|user2_to_keep_in//g' | tr -s "," | xargs -i ./smbldap-groupmod.pl -x {} group_name
@julienXX
julienXX / gist:151325
Created July 21, 2009 13:23
Script for LDAP user creation + skeleton
#!/bin/bash
#fx-useradd uid "first name" "last name"
PATH='/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin'
SKEL_PATH="/homes/skeleton"
usage() {
cat <<EOT
Usage: ${CMD} login first_name last_name
#!/usr/bin/env ruby
# Ruby script to generate SSHA (Good for LDAP)
require 'sha1'
require 'base64'
hash = "{SSHA}"+Base64.encode64(Digest::SHA1.digest(ARGV[0]+'salt')+'salt').chomp!
puts 'userPassword: '+hash+"\n"
# Ruby on Rails Developer, Paris
describe "Ruby on Rails Developer" do
before do
me = Developer.new(
:name => 'Julien Blanchard',
:website => 'http://sideburns.eu',
:email => 'julien@sideburns.eu',
)
you = Company.new
job = Job.new(me, you, :title => "Ruby on Rails Developer", :location => "Paris")
@julienXX
julienXX / snippet.rb
Created January 1, 2010 15:36
teempush.rb
#!/opt/ruby-enterprise/bin/ruby
#
# you need to install :
# ruby
# ruby-dev
# libopenssl-ruby libxml2-dev libxslt1-dev (ubuntu/debian)
# lsb_release package (named redhat-lsb on centos and fedora)
# rubygems :
## gem install uuidtools activeresource sysinfo nokogiri
##
rvm install jruby
/Users/julien/.rvm/src/jruby-1.4.0 has already been extracted.
Building Nailgun
Error running 'builtin cd "/Users/julien/.rvm/src/jruby-1.4.0/tool/nailgun" && ./configure --prefix=/Users/julien/.rvm/rubies/jruby-1.4.0 && make ', please check /Users/julien/.rvm/log/jruby-1.4.0/nailgun.error.log
julien@infmac02 ~ > rvm debug
rvm 0.1.3 by Wayne E. Seguin (wayneeseguin@gmail.com) [http://rvm.beginrescueend.com/]
system:
uname: "Darwin infmac02.local 10.2.0 Darwin Kernel Version 10.2.0: Tue Nov 3 10:37:10 PST 2009; root:xnu-1486.2.11~1/RELEASE_I386 i386"
ruby:
interpreter: "ruby"