Skip to content

Instantly share code, notes, and snippets.

<head>
<title>fancypants</title>
</head>
<body>
{{> people}}
</body>
<template name="people">
select
count(id),
upper + lower + digit as complexity
from (
select
id
,password
,CASE WHEN
password similar to E'%[A-Z]%'
THEN 1
$('tr').map(function(i, it) {
cells = $(it).children('td');
if(cells[0])
return {
time: cells[0].textContent,
eld_fb: cells[1].textContent,
eld_fb2: cells[2].textContent,
eld_ob: cells[3].textContent
}
})
source :rubygems
gem 'json'
# Fix the path to search (and prioritize) $HOME/bin and /usr/local/bin
export PATH="$HOME/bin:/usr/local/bin:$PATH"
# Virtual Env Wrapper Prompt Stuff:
source `which virtualenvwrapper.sh`
workon work
export VIRTUAL_ENV_DISABLE_PROMPT=1
export PROMPT_COMMAND='source $HOME/bin/ps1'
# Setup autojump
@bensonk
bensonk / ps1.sh
Created February 29, 2012 21:53
Python, mercurial, and git friendly prompt script for bash.
#!/bin/bash
# Put this in ~/bin/ps1, and make it executable
# Then add the following line to your .bashrc or .bash_profile:
# PROMPT_COMMAND="source $HOME/bin/ps1"
HG_BRANCH=`hg branch 2>&1`
if [[ $? == 0 ]]
then
VCS_PROMPT="\[\033[00;33m\](\[\033[00;37m\]$HG_BRANCH\[\033[00;33m\]) \[\033[01;34m\]"
else
#!/usr/bin/env ruby
require "base64"
def b(string, context)
string.gsub /\^\{(.*?)\}/ do |s|
val = context.eval(s[2..-2])
"b64d(\"#{Base64.encode64(val).strip}\")"
end
end
# nvidia-settings: X configuration file generated by nvidia-settings
# nvidia-settings: version 270.29 (buildd@allspice) Fri Feb 25 14:42:07 UTC 2011
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 270.41.06 ([email protected]) Mon Apr 18 15:14:00 PDT 2011
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
module AssociationIds
def ids_for name
name = name.to_s
define_method (name + '_ids=').to_sym do |ids|
values = ids.collect { |id| Kernel.const_get(name.classify).find id }
self.send(name + '=', values)
end
define_method (name + '_ids').to_sym do
self.send(name).collect { |obj| obj.id }
@bensonk
bensonk / .bash_profile
Created October 17, 2011 01:46
My Bash Prompt
export PS1="\[\033[01;32m\]\u@\h\[\033[01;34m\] \w$(__git_ps1 "\e[1;30m [%s]") \[\033[01;34m\]$ \[\033[00m\]"