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 python | |
""" | |
Last.fm scrobbling for Pianobar, the command-line Pandora client. Requires Pianobar, Python, pyLast and Last.fm API credentials. | |
https://github.com/PromyLOPh/pianobar/ | |
http://code.google.com/p/pylast/ | |
http://www.last.fm/api/account | |
Installation: | |
1) Copy this script and pylast.py to the Pianobar config directory, ~/.config/pianobar/, and make sure this script is executable |
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/sh | |
brightness=$(cat /sys/class/backlight/gmux_backlight/brightness) | |
if [ $1 = '-inc' ] ; then | |
newbrightness=$(expr $brightness + $2 \* 3) | |
elif [ $1 = '-dec' ] ; then | |
newbrightness=$(expr $brightness - $2 \* 3) | |
fi | |
if [ $newbrightness -lt 0 ] ; 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
ssh-dss AAAAB3NzaC1kc3MAAACBALoCwmgFrZs1FpqOoVhOvbrUviydoOXrPCNlF5sgh2o09b38mjkJE11mkvyzdfqaOyyphbjKGWbyhnbJrqbj5cPrYsVa1/8FG8JCTKK8PB93MIGfji0WogMsFXJKvIeWtW8eD71Es2roxNe4sbVCY7m51akfD+CJv6q8eMpTAVmhAAAAFQDDC8KCAhtXt/uiZUvNywKpmQGBlQAAAIAH8CQLTo9MF2qLsqPJfvvEAI6WAj5bDvTS2HGXjwsEeH2XJmbH02kqOylDyZ/N/7hCc/6E6IkFPfb2z326HmU/bwZG7WWPDsXjOkC24QxTkw0j0s7Nl69gWvDqsTAmWivqpgYInffVpTEWClk4D6xnn7il+ZZ78EAbWpkO0YJJkQAAAIAPpnh/ngE7Pf6Sss/E+RuNIg17BCy/q9BbPUly20WnVtZkezdcZwaKBsyyuoHEqiN6dK4ZW+m3EYCUVDf+fLH3DT11lMGBN+RiF7peXI/rJcXJIzlITypcWvkxSkZ8zN+Lmb6moc4o8sjr1O5KC1H+CDduN72XLYegLS/O1qxp+w== hunter@puppetlabs.com |
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
# This is what a test would look like. | |
require 'spec_helper_acceptance' | |
describe 'some class' do | |
it 'does stuff' do | |
pp=<<-EOS | |
notify { 'done stuff spec': | |
message => 'This message should appear', | |
} | |
EOS |
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
require 'json' | |
class Hunner | |
end | |
class Hunner::Render < Redcarpet::Render::Base | |
# Add manifest introspection for parameters | |
# Do we really want hash keys? | |
# Error on duplicate keys | |
# Define a spec which they should adhere to (Check against rendered structure) | |
attr_accessor :last_header | |
attr_accessor :last_level |
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
include postgresql::server | |
# fails because you can't override from outside a class | |
Fail['/var/lib/postgresql9.5/datadir'] { | |
mode => '0755', | |
} | |
# succeeds because inheritance lets you override, but inheritance is spaghetti code | |
class test inherits postgresql::server::initdb { | |
File['/var/lib/postgresql9.5/datadir'] { | |
mode => '0755', |
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 | |
line="" | |
started="" | |
rm botfile | |
mkfifo botfile | |
tail -f botfile | nc irc.cat.pdx.edu 6667 | while true ; do | |
if [ -z $started ] ; then | |
echo "USER bdbot 0 bdbot :I iz a bot" > botfile | |
echo "NICK bdbot" >> botfile |
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
Vagrant.configure('2') do |config| | |
# Specify box files | |
config.vm.box = 'precise32' | |
config.vm.box_url = 'http://files.vagrantup.com/precise32.box' | |
# Create web frontend | |
config.vm.define 'web.example.com' do |node| | |
node.vm.network :forwarded_port, guest: 443, host: 4443 | |
node.vm.network :forwarded_port, guest: 80, host: 8080 |
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
$file_defaults = { | |
mode => '0600', | |
owner => 'root', | |
group => 'root', | |
ensure => file, | |
} | |
file {'/etc/ssh_host_dsa_key': | |
* => $file_defaults, | |
} | |
file { '/etc/ssh_host_key': |
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
[alias] | |
# See http://cat.pdx.edu/~hunner/git-lg.png for an example | |
lg = "log --decorate --pretty=format:'%C(yellow)%h%C(reset) %C(green)%G?%C(reset) %C(blue)%an%C(reset) %C(cyan)%cr%C(reset) %s %C(auto)%d%C(reset)' --graph --date-order" |
NewerOlder