Skip to content

Instantly share code, notes, and snippets.

@gregkare
gregkare / permissions
Created February 12, 2011 11:28
Fix Gandi Ubuntu/Debian permissions for SSH
chmod go-w ~ && chmod 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
@gregkare
gregkare / upstart
Created September 25, 2013 15:22
Upstart is INSANE
$ sudo init-checkconf /etc/init/znc.conf
ERROR: cannot run as root
$ init-checkconf /etc/init/znc.conf
ERROR: failed to ask Upstart to check conf file
2013-10-18 14:31:46 mdehaan_afk gkarekinian: comments on twitter not appreciated
2013-10-18 14:31:59 -- Mode #ansible [+o mdehaan_afk] by ChanServ
2013-10-18 14:32:11 gkarekinian My opinions are mine
2013-10-18 14:32:13 @mdehaan_afk if you have a specific problem in that code we'd be glad to help
2013-10-18 14:32:19 drybjed mdehaan_afk: link?
2013-10-18 14:32:29 @mdehaan_afk "I'm too old for this shit: http://ift.tt/17QmBzt "
2013-10-18 14:32:32 gkarekinian The problem? A 250 lines function
2013-10-18 14:32:49 gkarekinian If you don't see the problem I can't do anything
2013-10-18 14:32:55 @mdehaan_afk =The idea that we have to refactor things from time to time is known. Runner handles a lot of complexity.
2013-10-18 14:33:13 @mdehaan_afk seeing it's open source I don't take to kindly to people here that ask for a lot of help from us and then rant about it behind our back.
@gregkare
gregkare / 3g_checklist.md
Last active January 2, 2016 03:09
3G checklist

Disable Google automatic updates

defaults write com.google.Keystone.Agent checkInterval 0

Disable Firefox automatic updates, especially if you're using Nightly

Disable OS updates

@gregkare
gregkare / flash_hash.md
Last active April 27, 2018 16:51
FlashHash

How to crash Rails > 4.1.0 in a pretty confusing way:

def index
  redirect_to new_post_url, flash: flash
end
NoMethodError:
@gregkare
gregkare / gist:08c196f6800e88d0ab61
Created September 24, 2014 11:10
ruby2.1 2.1.3-1bbox1~precise1
I, [2014-09-24T11:07:17.623792 #14749] INFO -- : Refreshing Gem list
/var/www/liquor-cabinet/releases/7cbef2dee01eade8bfb1cc83defd9abbb42968e1/vendor/bundle/ruby/2.1.0/gems/backports-3.3.0/lib/backports/1.9.1/io/open.rb:2:in `close': Bad file descriptor @ fptr_finalize - /var/www/
liquor-cabinet/releases/7cbef2dee01eade8bfb1cc83defd9abbb42968e1/vendor/bundle/ruby/2.1.0/gems/backports-3.3.0/lib/backports/1.9.1/io/open.rb (Errno::EBADF)
from /var/www/liquor-cabinet/releases/7cbef2dee01eade8bfb1cc83defd9abbb42968e1/vendor/bundle/ruby/2.1.0/gems/backports-3.3.0/lib/backports/1.9.1/io/open.rb:2:in `open'
from /var/www/liquor-cabinet/releases/7cbef2dee01eade8bfb1cc83defd9abbb42968e1/vendor/bundle/ruby/2.1.0/gems/backports-3.3.0/lib/backports/1.9.1/io/open.rb:2:in `<top (required)>'
from /var/www/liquor-cabinet/releases/7cbef2dee01eade8bfb1cc83defd9abbb42968e1/vendor/bundle/ruby/2.1.0/gems/backports-3.3.0/lib/backports/tools.rb:328:in `require'
from /var/www/liquor-cabinet/releases/7
#!/usr/bin/env sh
if ! which boot2docker; then
brew install boot2docker
mkdir $HOME/.boot2docker
echo DOCKER_PORT=32000 > $HOME/.boot2docker/profile
fi
if [[ -z $DOCKER_HOST ]]; then
export DOCKER_HOST="tcp://127.0.0.1:32000"
add_to_shell=1
$ file crul
crul: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24, BuildID[sha1]=0xa4e9e283be451c3511b96c2636a263ae4b1b6792, not stripped
$ ./crul
./crul: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.14' not found (required by ./crul)
require 'minitest/autorun'
describe 2 do
i_suck_and_my_tests_are_order_dependent!
describe '1' do
it 'runs the spec in the same order' do
puts '1'
end
chef > node['graylog2']['elasticsearch']['max_size_per_index']
=> 1073741824
chef > node.override['graylog2']['elasticsearch']['max_size_per_index'] = nil
=> nil
chef > node['graylog2']['elasticsearch']['max_size_per_index']
=> 1073741824