Skip to content

Instantly share code, notes, and snippets.

View hh's full-sized avatar

Hippie Hacker hh

View GitHub Profile
@staltz
staltz / introrx.md
Last active May 6, 2024 01:44
The introduction to Reactive Programming you've been missing
@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
@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
@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
@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
@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|
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@kylemanna
kylemanna / connmanctl.md
Last active June 27, 2023 23:12
Connmanctl Cheat Sheet
# Windows AMIs don't have WinRM enabled by default -- this script will enable WinRM
# AND install 7-zip, curl and .NET 4 if its missing.
# Then use the EC2 tools to create a new AMI from the result, and you have a system
# that will execute user-data as a PowerShell script after the instance fires up!
# This has been tested on Windows 2008 SP2 64bits AMIs provided by Amazon
#
# Inject this as user-data of a Windows 2008 AMI, like this (edit the adminPassword to your needs):
#
# <powershell>
# Set-ExecutionPolicy Unrestricted
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,