Skip to content

Instantly share code, notes, and snippets.

@popsikle
popsikle / keybase.md
Last active February 28, 2019 16:40
keybase.md

Keybase proof

I hereby claim:

  • I am popsikle on github.
  • I am popsikle (https://keybase.io/popsikle) on keybase.
  • I have a public key ASANMDV4oUp_OITDYosyWx6kwRm5MdURBojFHj9vVSx1ZQo

To claim this, I am signing this object:

@popsikle
popsikle / cacert.pem
Created April 26, 2018 00:38
cacert.pem
##
## Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Wed Mar 7 04:12:06 2018 GMT
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## https://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt
##
@popsikle
popsikle / 00_wireless.sh
Created May 24, 2016 12:10
Outset boot-once scripts that wait for network.
#!/bin/bash
#
# This script sets up the Wireless Connection
#
# Sleeping for 30 seconds to allow the new default User Template folder to be moved into place
sleep 30
# Determine OS and build version, as well as serial number
@popsikle
popsikle / Makefile
Created December 17, 2015 22:31
JSON to BSON conversion in C
all: json2bson
clean:
rm -f json2bson
json2bson: json2bson.c
${CC} $(shell pkg-config --cflags json libmongo-client glib-2.0) -Wall -O0 -ggdb3 -std=c99 ${CFLAGS} \
$(shell pkg-config --libs json libmongo-client glib-2.0) -o $@ $^
check: all
./json2bson <test.json >test.bson
--- /usr/src/ixgbevf-2.16.1/src/kcompat.h.orig 2015-02-03 18:34:22.901474028 +0000
+++ /usr/src/ixgbevf-2.16.1/src/kcompat.h 2015-02-03 18:35:32.577440102 +0000
@@ -3219,8 +3219,6 @@
#define u64_stats_update_begin(a) do { } while(0)
#define u64_stats_update_end(a) do { } while(0)
#define u64_stats_fetch_begin(a) do { } while(0)
-#define u64_stats_fetch_retry_bh(a) (0)
-#define u64_stats_fetch_begin_bh(a) (0)
#if (RHEL_RELEASE_CODE && RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(6,1))
#!/usr/bin/env bash
if ! type brew > /dev/null 2>&1 ; then
log_info "Installing Brew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
if [ -z "$BREW_PREFIX" ]; then
BREW_PREFIX=$(brew --prefix)
export PATH="${BREW_PREFIX}/bin:$PATH"
@popsikle
popsikle / edb.rb
Last active September 28, 2015 22:02
key_path = 'secret_key'
data_path = databags/test.json'
secret = Chef::EncryptedDataBagItem.load_secret(key_path.realpath)
data = JSON.parse(File.read(data_path.realpath))
encrypted_data = Chef::EncryptedDataBagItem.encrypt_data_bag_item(data, secret)
puts JSON.pretty_generate(encrypted_data)
plain_data = ::Chef::EncryptedDataBagItem.new(encrypted_data, secret).to_hash
@popsikle
popsikle / library.rb
Created September 22, 2015 21:10
mariadb_gem_requirements
module DBGems
module Mariadb
def mariadb_gem_requirements
system "apt-get install -y software-properties-common"
system "apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xcbcb082a1bb943db"
system "add-apt-repository 'deb http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.0/ubuntu trusty main'"
system "apt-get update -y"
system "apt-get install -y mariadb-client libmariadbclient-dev"
end
@popsikle
popsikle / .bash_profile
Created September 19, 2015 02:43
osx profiles
# Local profile
source ~/.profile
# Prrrrrommmmmpmppppttpttptpt
export PS1="\[$(tput setaf 5)\]\W\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]"
export CLICOLOR=1
export LSCOLORS=ExFxCxDxBxegedabagacad
# Hist all things!
HISTFILESIZE=100000
@popsikle
popsikle / chef_server_backup.rb
Created July 24, 2015 14:58
knife exec chef_server_backup.rb
#
# Author:: Joshua Timberman (<joshua@opscode.com>)
# Author:: Adam Jacob (<adam@opscode.com>)
# Author:: Salvatore Poliandro (<popsikle@gmail.com>)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0