Skip to content

Instantly share code, notes, and snippets.

View shadowbq's full-sized avatar
👔
Doing Things

shadowbq shadowbq

👔
Doing Things
View GitHub Profile
@seratch
seratch / config.yml
Created October 25, 2012 09:37
AWS SQS Example
access_key_id: xxx
secret_access_key: yyy
@igalic
igalic / Makefile
Created February 13, 2013 08:35
Makefile to create a root-ca, an intermediate signing CA. It can also be used to quickly create keys and Certificates and sign them with that intermediate CA. You should put the root-ca into your Trust Store (preferably as the only CA;) and make sure your programs validate it correctly.
root_DN = /CN=Esotericsystems Root Authority/C=AT/
issuing_DN = /CN=Esotericsystems Issuing Authority/C=AT/
passphrase:
echo -n changeme > $@
#
# Create param files, keys and Self-Signed Certificate for the Root CA
#
root-ca-dsa.param: passphrase
@f440
f440 / config.ru
Created December 20, 2013 07:43
forwardable
require 'sinatra/base'
require 'forwardable'
class I18n
def self.t(s); "I18n.t(#{s})"; end
def self.l(s); "I18n.l(#{s})"; end
end
class App < Sinatra::Base
extend Forwardable
@mikermcneil
mikermcneil / disabling-macosx-notification-center.md
Last active July 10, 2023 10:51
Disable/Enable Notification Center (MacOS X)

Toggle MacOS X Notification Center on or off

This gist is to remind me (and anyone else who it helps) how to quickly disable and re-enable Notification Center.

Set Up Bash Aliases

Installation

  1. Open your terminal (<⌘ + ␣ (spacebar)>, then type "terminal", then press <↩ (enter)>).
@f440
f440 / evernote2txt.rb
Created April 20, 2014 14:32
Evernote xml (enex) to txt
#!/usr/bin/env ruby
#-*- encoding: utf-8 -*-
# http://blog.evernote.com/tech/2013/08/08/evernote-export-format-enex/
require 'nokogiri'
require 'date'
require 'ostruct'
class Note < OpenStruct; end
@mikesmullin
mikesmullin / tcpflow-1.4.4_wrapper.coffee
Last active November 8, 2017 11:42
wrapper for tcpflow which enhances its stdout output to include easily parsed timestamp format, incl. milliseconds, tz offset, and packaged in flat json one-object-per-row ideal for mapreducing on
#!/usr/bin/env coffee
#
# install on ubuntu:
# sudo apt-get install automake autoconf libpcap-dev zlib1g-dev libboost-dev libcairo2-dev
#
# cd /tmp/
# git clone --recursive -b tcpflow-1.4.4 git@github.com:simsong/tcpflow.git tcpflow/
# cd tcpflow/
#
# sh bootstrap.sh
@obfusk
obfusk / break.py
Last active May 1, 2024 20:32
python "breakpoint" (more or less equivalent to ruby's binding.pry); for a proper debugger, use https://docs.python.org/3/library/pdb.html
import code; code.interact(local=dict(globals(), **locals()))
anonymous
anonymous / untrusted-lvl5-solution.js
Created May 4, 2015 13:30
Solution to level 5 in Untrusted: http://alex.nisnevich.com/untrusted/
/******************
* minesweeper.js *
******************
*
* So much for Asimov's Laws. They're actually trying to kill
* you now. Not to be alarmist, but the floor is littered
* with mines. Rushing for the exit blindly may be unwise.
* I need you alive, after all.
*
* If only there was some way you could track the positions
@crmne
crmne / download_zeal_user_docsets.py
Last active June 6, 2022 08:37
A solution to the lack of UI for Dash's user docsets in Zeal. Uses Python 3 and easygui (pip3 install easygui)
"""Download Dash User Docsets and install them in Zeal"""
import configparser
import json
import tarfile
import urllib.request
from pathlib import Path
from sys import platform
import easygui
@shadowbq
shadowbq / vmkernel_prep.sh
Last active March 11, 2018 22:42
AskUbuntu SO #966585 - Post Kernel Upgrade
#!/usr/bin/env bash
# Must be run as root / sudo
# Reference: https://askubuntu.com/questions/966585/ubuntu-17-10-upgrade-broke-vmware-workstation-12-5
if [ $(dpkg-query -W -f='${Status}' linux-headers-generic 2>/dev/null | grep -c "ok installed") -eq 0 ];
then
echo "Kernel Headers Package Missing"
echo "apt-get install linux-headers-generic";
exit 1
fi