Skip to content

Instantly share code, notes, and snippets.

@deviantintegral
deviantintegral / gist:3340625
Created August 13, 2012 13:15
Bookmarklet to show Yammer postings in chronological order
javascript:(function(){ul=jQuery('.yj-feed-messages');ul.children().each(function(i,li){ul.prepend(li)})})();
[alias]
lg = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit
llg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --abbrev-commit
@deviantintegral
deviantintegral / gist:5483766
Created April 29, 2013 18:47
Setting apt config before running apt.
diff --git a/manifests/nodes.pp b/manifests/nodes.pp
index 66dc1a1..e18d6c9 100644
--- a/manifests/nodes.pp
+++ b/manifests/nodes.pp
@@ -31,11 +31,46 @@ class rome::onehost {
}
}
+stage { 'first':
+ before => Stage['main'],
@deviantintegral
deviantintegral / oauth.php
Created April 30, 2013 13:44
Example of simple 0-legged oauth request signing.
<?php
/**
* Sign a request to the Hackpad API using oauth 1.0. The Hackpad API doesn't
* use tokens or anything beyond a very basic oauth request.
*
* @params $uri
* The URI to make the request to.
* @param $method
* The HTTP method used for the request.
* @param $query
commit aacdf014a943cee6b9b88fbff9165e1f7d43812d
Author: Andrew Berry <root@squeaky.furrypaws.ca>
Date: Sun Mar 31 15:30:00 2013 -0400
Updating to Ubuntu 12.04.2.
diff --git a/varnish/default.vcl b/varnish/default.vcl
index 3f1c064..be3ee42 100644
--- a/varnish/default.vcl
+++ b/varnish/default.vcl
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
driftfile /var/lib/ntp/ntp.drift
# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/
statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
# cd /tmp/vagrant-puppet/manifests && FACTER_nfs_www='192.168.100.1:/Users/andrew/vagrant/projects/rome/www' FACTER_apt_proxy='http://192.168.31.42:3142' FACTER_project='rome' puppet apply --modulepath '/etc/puppet/modules:/tmp/vagrant-puppet/modules-0' site.pp --detailed-exitcodes -v
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/facter_dot_d.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/puppet_vardir.rb
info: Loading facts in /tmp/vagrant-puppet/modules-0/stdlib/lib/facter/root_home.rb
warning: notify is a metaparam; this value will inherit to all contained resources
info: Applying configuration version '1367627933'
notice: /Stage[main]/Rome::Apache/Pear::Package[drush]/Package[pear-pear.drush.org-drush]/ensure: ensure changed '5.9.0' to '6.0.0'
info: FileBucket got a duplicate file {md5}c7bc6386a8d56e24b231d0b224969468
info: /Stage[main]/Rome::Apache/File[/etc/php5/apache2/conf.d/custom.ini]: Filebucketed /etc/php5/apache2/conf.d/custom.ini to puppet wit
file { '/etc/php5/apache2/conf.d/custom.ini':
ensure => present,
source => '/vagrant/files/apache/etc/php5/apache2/conf.d/custom.ini',
owner => 'root',
group => 'root',
notify => Service['apache2'],
}
<?php
$a = array(
- 'first key' => 'first value',
);
var_dump($a);
var_dump(+"first key");
var_dump(-"first key");
$ sudo git diff
diff --git a/init.d/redis-server b/init.d/redis-server
index b235e8d..c14faef 100755
--- a/init.d/redis-server
+++ b/init.d/redis-server
@@ -1,4 +1,4 @@
-#! /bin/sh
+#! /bin/bash -ex
### BEGIN INIT INFO
# Provides: redis-server