Skip to content

Instantly share code, notes, and snippets.

@olibob
olibob / xmonad.hs
Created August 10, 2013 11:47
xmonad config
import XMonad
import XMonad.Config.Azerty
import qualified Data.Map as M
-- http://www.haskell.org/haskellwiki/Xmonad/Config_archive/John_Goerzen%27s_Configuration
-- followinf the tutorial
import XMonad.Hooks.DynamicLog
import XMonad.Hooks.ManageDocks
import XMonad.Util.Run(spawnPipe)
import XMonad.Util.EZConfig(additionalKeys)
@olibob
olibob / .slate
Created July 6, 2013 08:34
Slate Config
# This is the default .slate file.
# If no ~/.slate file exists this is the file that will be used.
config defaultToCurrentScreen true
config keyboardLayout azerty
config windowHintsShowIcons true
config windowHintsIgnoreHiddenWindows false
config windowHintsSpread true
config nudgePercentOf screenSize
config resizePercentOf screenSize
@olibob
olibob / gsaMon.rb
Created February 7, 2013 06:32
GSA snmp monitoring script
#!/usr/bin/env ruby
# Author: Olivier Robert
# Email: [email protected]
# Date: 02/05/2013
# Version: 0.0.1
# Usage: gsaMon <snmp agent>
#
# Description:
# snmp query to a GSA appliance:
# => system.temperature.temperatureHealth Integer, Read-only Temperature status:
@olibob
olibob / gist:4555955
Created January 17, 2013 13:38
CMDB access
#!/usr/bin/env ruby
# Author: Olivier Robert
# Date: 12/07/2012
# Version: 0.0.2
# Usage: cmdb configuration_item
# Description:
# Query CMDB for specific configuration items
require 'optparse'
require 'net/http'
@olibob
olibob / gist:4241802
Created December 8, 2012 20:34
mysql: MacOS X install
brew remove mysql
brew cleanup
launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist
rm ~/Library/LaunchAgents/com.mysql.mysqld.plist
sudo rm -rf /usr/local/var/mysql
I then started from scratch:
@olibob
olibob / gist:4239990
Created December 8, 2012 11:53 — forked from padolsey/gist:527683
javascript: detect IE
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@olibob
olibob / .bash_profile
Created December 8, 2012 11:49
osx: bash profile
# Colored ls
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Java crap
export JAVA_HOME=/Library/Java/Home
export CATALINA_HOME=/usr/local/tomcat
# Aliases
alias ll='ls -lhF'