Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/
# Install stuff #
#################
# Install development tools and some misc. necessary packages
yum -y groupinstall "Development tools"
yum -y install zlib-devel # gen'l reqs
# Meme Generator 1
# Demonstrates how to draw text on images using PIL
# (Python Imaging Library)
#
# The script loads an image from the clipboard (or uses
# a default one if the clipboard is empty) and asks for
# two captions (top and bottom) that are then drawn onto
# the image.
import Image
@xvrdm
xvrdm / zsh.md
Created August 8, 2014 10:05 — forked from tsabat/zsh.md
@xvrdm
xvrdm / pivot_and_stack.md
Last active December 15, 2015 16:40
Pivot and Stack in Python using Pandas

Process:

  1. Index all columns that don't need reshape
  2. Stack the rest
df
first second         A         B
bar   one     0.721555 -0.706771
bar   two    -1.039575  0.271860
(ns proj.core)

(defn test1-handler [request]
  {:body (str "Test1: " request)})

(defn test2-handler [request]
  {:body (str "Test2: " request)})

(defn route-handler [request]
head -1 20151209-file.csv > concat.csv && tail -q -n +2 2015*.csv >> concat.csv
@xvrdm
xvrdm / osx-for-hackers.sh
Created April 29, 2016 09:15 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugin
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@xvrdm
xvrdm / init.lua
Last active September 28, 2022 08:54 — forked from alexander-clark/init.lua
Hammerspoon - switch Mac Input Source / keyboard layout on Kinesis Advantage connect / disconnect
usbWatcher = nil
function usbDeviceCallback(data)
if (data["productName"] == "Kinesis Keyboard Hub") then
if (data["eventType"] == "added") then
hs.keycodes.setLayout("U.S. International - PC")
elseif (data["eventType"] == "removed") then
hs.keycodes.setLayout("Swiss French")
end
end
@xvrdm
xvrdm / Emacs.md
Created April 10, 2018 14:10 — forked from redinger/Emacs.md
Setting up Emacs daemon on OS X

Setting up Emacs daemon on OS X

Tired of waiting for emacs to start on OS X? This step by step guide will teach you how to install the latest version of emacs and configure it to start in the background (daemon mode) and use emacsclient as your main editor.

Install Cocoa Emacs

Download the latest pretest version of [Emacs for Mac OS X]: http://emacsformacosx.com/builds