##"DevOops & How I Hacked You"##
Ken Johnson @cktricky
Chris Gates @carnal0wnage
Devops Days Washington DC 12 June 2015
# add in your .bashrc | |
# http://henrik.nyh.se/2008/12/git-dirty-prompt | |
# http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/ | |
# http://blog.cyberion.net/2009/01/improved-bash-prompt-for-git-usage.html | |
# username@Machine ~/dev/dir[master]$ # clean working directory | |
# username@Machine ~/dev/dir[master⚡]$ # dirty working directory | |
# | |
# I've made the following ajustements: | |
# - Use of plumbing, that should be faster than git status porcelain. | |
# - Don't show my repo as dirty if it has files unknown from the index (I always have). |
#!/bin/bash | |
# i3lock blurred screen inspired by /u/patopop007 and the blog post | |
# http://plankenau.com/blog/post-10/gaussianlock | |
# Timings are on an Intel i7-2630QM @ 2.00GHz | |
# Dependencies: | |
# imagemagick | |
# i3lock |
##"DevOops & How I Hacked You"##
Ken Johnson @cktricky
Chris Gates @carnal0wnage
Devops Days Washington DC 12 June 2015
func EncodeStreamingVideo(streamingFile io.Reader, request ShouldCanceler) (*os.File, error) { | |
outputFilename := generateFilename("mp4") | |
// Actually start the command. | |
cmd := exec.Command("ffmpeg", | |
// Read input from stdin. | |
"-i", "-", | |
// ... environment-specific ffmpeg options ... | |
"-y", outputFilename) |
Attention: the list was moved to
https://github.com/dypsilon/frontend-dev-bookmarks
This page is not maintained anymore, please update your bookmarks.
function check_for_virtual_env { | |
[ -d .git ] || git rev-parse --git-dir &> /dev/null | |
if [ $? == 0 ]; then | |
local ENV_NAME=`basename \`pwd\`` | |
if [ "${VIRTUAL_ENV##*/}" != $ENV_NAME ] && [ -e $WORKON_HOME/$ENV_NAME/bin/activate ]; then | |
workon $ENV_NAME && export CD_VIRTUAL_ENV=$ENV_NAME | |
fi | |
elif [ $CD_VIRTUAL_ENV ]; then |
Helper scripts for genymotion and android development
# What's this? It's a monster list of Google domain names that have been found to refer | |
# users to sites that are monitored with Shaun Inman's "Mint" statistics package. http:/haveamint.com/ | |
# | |
# A huge number of these came from Shawn Blanc's domain list here: | |
# http://shawnblanc.net/2010/08/cleanup-mint-unique-referrers/ | |
# | |
# I merged them in to my existing list for this "MONSTAH LIST". Enjoy! | |
# | |
# To filter many, many of the Google search results from your "Newest Unique Referrers" results in | |
# Mint, copy the list below verbatim (don't include these "comment" lines) and paste them into your |
""" | |
SQLAlchemy, PostgreSQL (psycopg2), and autocommit | |
See blog post: http://oddbird.net/2014/06/14/sqlalchemy-postgres-autocommit/ | |
""" | |
from contextlib import contextmanager | |
from sqlalchemy import create_engine, event | |
from sqlalchemy.orm import sessionmaker, Session as BaseSession |
// +build windows | |
package screen | |
import ( | |
"fmt" | |
"image" | |
"reflect" | |
"syscall" | |
"unsafe" |