Skip to content

Instantly share code, notes, and snippets.

View jirwin's full-sized avatar

Justin Gallardo jirwin

  • Oakland, California
View GitHub Profile
#!/bin/bash
# Create a temporary file to store the screenshot in
tmpfile=$(mktemp /tmp/XXXXXXX.png)
# Take the screenshot
scrot -s "$tmpfile" > /dev/null
# Copy the file to the server
scp "$tmpfile" gina:/mnt/khaldrobo/screenshots > /dev/null

Keybase proof

I hereby claim:

  • I am jirwin on github.
  • I am jirwin (https://keybase.io/jirwin) on keybase.
  • I have a public key ASCjYBmTwgLmlSWKtPUfNbTvVg55_EkBUlhNDIGg6wS3swo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am jirwin on github.
  • I am jirwin (https://keybase.io/jirwin) on keybase.
  • I have a public key ASAV-KjOri0pwmIcbZKTfADcu8P81sw8AR5NDbKYD6OIJQo

To claim this, I am signing this object:

@jirwin
jirwin / index.html
Created October 8, 2015 18:08
webOfTrustExample
<!DOCTYPE html>
<meta charset="utf-8">
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js"></script>
<style>
path.link {
fill: none;
stroke: #5668e2;
stroke-width: 1.5px;
}
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
public class DefaultDict<K, V> extends HashMap<K, V> {
Class<V> klass;
public DefaultDict(Class klass) {
this.klass = klass;
}
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAtkU5tB7Q6qtbHXUmnCU4D8QZ332xW0yOWnpiYTWx4j/wYiEi2ux01Bs8s6bjt9D9wFWSUGk15O5+ibvSegTJ2WfZ+Itkr1O1FPL+8MyOrqjqNSQcTNtFjV/QF4EzXzQdjsJ5uErRpnMvMv2ZFW5CCqM/UJyc3uAf0ExtTAqmUZuBcRCrwCmnrCDvZKD0/VHKSbdeXroBKtyW8rJSnLF6dP0b7Ek6eBR37FXlmZi6s2j2yvXWD0JD9Mxorz7gFKu0Zm8o2i0dsGk+E2SBXuhsxh2r9DGW93hXF3xdTus4ytL8DAp5MYVcya3S8ldyhTVVNStwWYX3jC+9U84xEvHIkw== justin@ashley.local
from lxml.html import parse
# this can be a full weburl as well
doc = parse('knives.html').getroot()
knives = {}
# start by iterating through every table cell
for td in doc.cssselect('td'):
# If the cell has align=center, valign=top, and isn't blank
set list listchars=tab:\ \ ,trail:·
map <C-H> <C-W>h<C-W>_
map <C-J> <C-W>j<C-W>_
map <C-K> <C-W>k<C-W>_
map <C-L> <C-W>l<C-W>_
// jslint.js
// 2010-08-08
/*
Copyright (c) 2002 Douglas Crockford (www.JSLint.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies