Skip to content

Instantly share code, notes, and snippets.

@spiette
spiette / vimrc
Last active September 28, 2015 02:58
Simple vimrc
set tabstop=4
set softtabstop=4
set shiftwidth=4
set expandtab
set smarttab
set wildmenu
set showcmd
set ignorecase
set smartcase
@spiette
spiette / .LESS_TERMCAP
Created July 5, 2012 04:14
less environment variables for colors in man pages
# to be sourced from .profile, .bash_profile or .bashrc
# http://unix.stackexchange.com/questions/119/colors-in-man-pages
export LESS_TERMCAP_mb=$(tput setaf 2) # green
export LESS_TERMCAP_md=$(tput bold; tput setaf 4) # blue
export LESS_TERMCAP_me=$(tput sgr0)
export LESS_TERMCAP_so=$(tput bold; tput setaf 7; tput setab 4) # white on blue
export LESS_TERMCAP_se=$(tput rmso; tput sgr0) # reset previous line
export LESS_TERMCAP_us=$(tput smul; tput bold;) # underlined and bold
export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
export LESS_TERMCAP_mr=$(tput rev)
class { 'apt':
always_autoupdate => true
}
Class['apt::update'] -> Package <| |>
@spiette
spiette / gist:5280394
Created March 31, 2013 12:01
yaml dump in rspec puppet
$stdout.puts self.catalogue.to_yaml
@spiette
spiette / gist:5448827
Created April 24, 2013 01:13
How to disable Esc (so you learn to use <Ctrl>-[ instead.
xmodmap -e "keycode 9=Ooblique"
#!/usr/bin/env python
import urllib2
import json
url = 'http://localhost:8080/v3/nodes'
r = urllib2.Request(url)
r.add_header('Accept', 'application/json')
u = urllib2.urlopen(r)
@spiette
spiette / desktop.pp
Created January 20, 2014 20:01
Very very [...] basic desktop setup manifest
case $::osfamily {
'RedHat': {
$vim = 'vim-enhanced'
$mtr = 'mtr'
}
'Debian': {
$vim = 'vim'
$mtr = 'mtr-tiny'
}
default: {
https://groups.google.com/forum/#!topic/puppet-dev/AbXgZEFl3ME
you can dump the entire catalogue to stdout with the following:
it { p subject.resources }
If you are interested in just the one resource, it is probably easier to use:
it { p subject.resource('User', 'foo') }

Keybase proof

I hereby claim:

  • I am spiette on github.
  • I am spiette (https://keybase.io/spiette) on keybase.
  • I have a public key whose fingerprint is 4191 7248 B2E0 C612 F7D2 4ECC 2E6E 40D4 0AFF CA06

To claim this, I am signing this object:

@spiette
spiette / jinja_variables_types.yml
Created March 3, 2016 14:52
Test the variables types in jinja2 templates, used here with ansible
---
- hosts: all
gather_facts: no
vars:
string: "string"
list:
- item1
- item2
dict:
key1: value1