Skip to content

Instantly share code, notes, and snippets.

View justbuchanan's full-sized avatar

Justin Buchanan justbuchanan

View GitHub Profile
#!/bin/bash
# Set your desktop background to your screen saver.
# Install and activate with:
# curl -fsSL https://git.io/vMgM9 | bash
#
# The screen saver is visible only on desktops created before the screen saver
# was started. If you create a desktop and wish to see the screen saver on it
# immediately, just do:
# open -a ScreenSaverEngine
# to bring it in front of the default desktop background. You can also add
@jjones646
jjones646 / 70-yubikey-u2f.rules
Last active May 21, 2016 00:15
Configuration examples for setting up a Yubikey for OTP+U2F+CCID and storing GPG keys for use with Ubuntu.
# Put this file in /etc/udev/rules.d/ and run this command:
# $ /etc/init.d/udev restart
# This file contains the udev rule for allowing access to a Yubikey for U2F authentication.
ACTION!="add|change", GOTO="yubikey_u2f_end"
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0113|0114|0115|0116|0120|0402|0403|0406|0407|0410", TAG+="uaccess"
LABEL="yubikey_u2f_end"
@Airblader
Airblader / py3lock.py
Created May 11, 2015 16:41
Obscure only actual windows for i3lock
#!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# vim:ts=2:sw=2:expandtab
import os
import xcb
from xcb.xproto import *
from PIL import Image
XCB_MAP_STATE_VIEWABLE = 2
@nocnokneo
nocnokneo / CMakeLists.txt
Last active January 4, 2024 03:34
VTK Rendered to an FBO in a Qt Quick 2 Scene Graph
cmake_minimum_required(VERSION 2.8.11)
project(VtkFboInQtQuick)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
@takeshixx
takeshixx / hb-test.py
Last active March 9, 2024 13:37
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
"""
Author: takeshix <takeshix@adversec.com>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (jspenguin@jspenguin.org).
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
"""
import sys,struct,socket
from argparse import ArgumentParser
@kconragan
kconragan / keyrepeat.shell
Last active December 4, 2023 03:40
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@huyng
huyng / matplotlibrc
Created February 8, 2011 15:50
my default matplotlib settings
### MATPLOTLIBRC FORMAT
# This is a sample matplotlib configuration file - you can find a copy
# of it on your system in
# site-packages/matplotlib/mpl-data/matplotlibrc. If you edit it
# there, please note that it will be overridden in your next install.
# If you want to keep a permanent local copy that will not be
# over-written, place it in HOME/.matplotlib/matplotlibrc (unix/linux
# like systems) and C:\Documents and Settings\yourname\.matplotlib
# (win32 systems).
@sigerello
sigerello / unicorn
Created August 31, 2010 17:14
/etc/init.d script for unicorn
#!/bin/sh
# chkconfig: 2345 85 15
# description: init.d script for single or multiple unicorn installations. Expects at least one .conf file in /etc/unicorn
# processname: unicorn
#
## A sample /etc/unicorn/my_app.conf
##
## RAILS_ENV=production
## RAILS_ROOT=/var/apps/www/my_app/current
#