Skip to content

Instantly share code, notes, and snippets.

View LeoAdamek's full-sized avatar

Leo Adamek LeoAdamek

View GitHub Profile
@LeoAdamek
LeoAdamek / gist:7893247
Created December 10, 2013 16:14
XRANDR
➜ ~ xrandr
Screen 0: minimum 320 x 200, current 3200 x 1200, maximum 8192 x 8192
DVI-I-1 connected 1600x1200+1600+0 (normal left inverted right x axis y axis) 367mm x 275mm
1600x1200 60.0*+
1280x1024 75.0 60.0
1152x864 75.0
1024x768 75.1 60.0
800x600 75.0 60.3
640x480 75.0 60.0
720x400 70.1
@LeoAdamek
LeoAdamek / gist:8419967
Created January 14, 2014 15:20
Issue with WebMock
1) Unfuddled::REST::Client#put allows custom put requests
Failure/Error: expect(
The request GET https://account.unfuddle.com/api/v1/custom/put with body {"updated"=>"object"} was expected to execute 1 time but it executed 0 times
The following requests were made:
PUT https://USERNAME:PASSWORD@account.unfuddle.com/api/v1/custom/put with body '{"updated":"object"}' with headers {'Accept'=>'application/json', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Content-Type'=>'application/json; charset=UTF-8', 'User-Agent'=>'Unfuddled Ruby Gem Client'} was made 1 time
@LeoAdamek
LeoAdamek / data.json
Last active August 29, 2015 13:57
ElasticSearch Faceting
POST /sandbox/holiday/C10
{
"code" : "EEWWLL",
"name" : "Winter Wonder",
"description" : "Winter wonder and stuff and other words which contain stuff about europe, winter and so on.",
"categories" : {
"Accommodation" : [
"Single Gender",
"Mixed Style",
/**
* Simple application to output incremented values (%100)
* And to show a total on exit signals
*
* Really awful code probably...
*/
package main
import (
"github.com/Sirupsen/logrus"
func observeApplicationSignals() {
for {
// Wait for an application signal to be captured
signal := <- applicationSignals
if signal == os.Interrupt {
log.Warn("Got Interrupt -- Ignored, Press ^D to exit")
}
}
@LeoAdamek
LeoAdamek / gist:9997785
Created April 5, 2014 20:37
Error from pacman-key
/usr/bin/pacman-key: line 605: 3633 Done printf 'y\ny\n'
3634 Illegal instruction (core dumped) | LANG=C "${GPG_PACMAN[@]}" --command-fd 0 --quiet --batch --lsign-key "${key_id}"
==> ERROR: AB19265E5D7D20687D303246BA1DFB64FFF979E7 could not be locally signed.
@LeoAdamek
LeoAdamek / puppet.conf
Created April 18, 2014 20:57
Foreman Provisioning Template
[main]
vardir = /var/lib/puppet
logdir = /var/log/puppet
rundir = /var/run/puppet
ssldir = \$vardir/ssl
[agent]
pluginsync = true
report = true
ignoreschedules = true
@LeoAdamek
LeoAdamek / gist:11229092
Created April 23, 2014 19:26
MCollective Error
root@kollection:~# mcollectived
/usr/lib/ruby/vendor_ruby/mcollective/pluginmanager.rb:169:in `load': cannot load such file -- mcollective/connector/rabbitmq.rb (LoadError)
from /usr/lib/ruby/vendor_ruby/mcollective/pluginmanager.rb:169:in `loadclass'
from /usr/lib/ruby/vendor_ruby/mcollective/config.rb:128:in `loadconfig'
from /usr/sbin/mcollectived:29:in `<main>'
server {
server _; # Catch all
listen 80; # HTTP Traffic
# Redirect all requests to HTTPS
redirect ^ https://$host$request_uri? permanent;
}