Skip to content

Instantly share code, notes, and snippets.

View hh's full-sized avatar

Hippie Hacker hh

View GitHub Profile
@micgo
micgo / ec_node_fixer.rb
Created October 30, 2013 03:32
This should fix missing permissions on Enterprise Chef 11 after download/upload operations
#!/usr/bin/env ruby
require 'rubygems'
require 'chef/knife'
Chef::Config.from_file(File.join(Chef::Knife.chef_config_dir, 'knife.rb'))
rest = Chef::REST.new(Chef::Config[:chef_server_url])
Chef::Node.list.each do |node|
%w{read update delete grant}.each do |perm|
@fujin
fujin / -
Created January 13, 2014 23:12
import System.Posix.Unistd
import XMonad hiding (Tall)
import qualified XMonad.StackSet as W
import qualified Data.Map as M
import Control.Monad (filterM)
import Data.Char (ord)
import Data.List
import Data.Maybe
import Data.Ratio
@fujin
fujin / -
Created January 13, 2014 23:14
import System.Taffybar
import System.Taffybar.Systray
import System.Taffybar.XMonadLog
import System.Taffybar.SimpleClock
import System.Taffybar.FreedesktopNotifications
import System.Taffybar.DiskIOMonitor
import System.Taffybar.CPUMonitor
import System.Taffybar.FSMonitor
import System.Taffybar.NetMonitor
import System.Taffybar.MPRIS
@irvingpop
irvingpop / ec11.1-ldap-bug.txt
Last active August 29, 2015 13:57
Patching the EC11.1 LDAP user creation bug
EC 11.1.x has a bug [OC-11384] when an LDAP user attempts to create a new account
that has never existed in the Enterprise Chef database before, rather than linking
with an existing internal user.
Please apply the attached patch to your EC 11.1.x release:
$ cd /opt/opscode/embedded/service/gem/ruby/1.9.1/bundler/gems/mixlib-authorization-c03f584a371b
$ patch -p1 < /tmp/cache/ec11.1-ldap500error.patch
patching file lib/opscode/models/user.rb
$ private-chef-ctl restart opscode-account
@yonran
yonran / pulse.txt
Created March 17, 2014 16:51
lsusb -v for Livescribe Pulse
Bus 004 Device 043: ID 1cfb:1010
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 2.00
bDeviceClass 2 Communications
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 16
@staltz
staltz / introrx.md
Last active May 12, 2025 23:22
The introduction to Reactive Programming you've been missing
@ober
ober / init.el
Created September 17, 2014 16:41
main
;;; init.el --- Where all the magic begins
;;
;; This file loads Org-mode and then loads the rest of our Emacs
;; initialization from Emacs lisp embedded in literate Org-mode files.
;; Load up Org Mode and (now included) Org Babel for elisp embedded in
;; Org Mode files
(setq dotfiles-dir (file-name-directory (or (buffer-file-name) load-file-name)))
(let* ((org-dir (expand-file-name
@ober
ober / .Xdefaults
Created September 18, 2014 18:36
Xdefaults
XTerm*faceName: Pragmata
XTerm*faceSize: 10
XTerm*background: grey13
XTerm*foreground: grey75
XTerm*cursorColor: darkorange1
XTerm*scrollBar: false
XTterm*utf8: 2
XTerm*metaSendsEscape: true
XTerm*eightBitInput: false
@justinclayton
justinclayton / add-dns-record.sh
Created July 15, 2015 22:04
CLI to add DNS Records in Route53
#!/bin/bash -eo pipefail
## Allows for creation of "Basic" DNS records in a Route53 hosted zone
function main() {
record_name=$1
record_value=$2
[[ -z $record_name ]] && echo "record_name is: $record_name" && exit 1
[[ -z $record_value ]] && echo "record_value is: $record_value" && exit 1
@m-ou-se
m-ou-se / replace-debian-with-arch.txt
Last active January 30, 2025 05:03
Instructions to replace a live Debian installation with Arch
# Download latest archlinux bootstrap package, see https://www.archlinux.org/download/
wget 'ftp://ftp.nluug.nl/pub/os/Linux/distr/archlinux/iso/latest/archlinux-bootstrap-*-x86_64.tar.gz'
# Make sure you'll have enough entropy for pacman-key later.
apt-get install haveged
# Install the arch bootstrap image in a tmpfs.
mount -t tmpfs none /mnt
cd /mnt
tar xvf ~/archlinux-bootstrap-*-x86_64.tar.gz --strip-components=1