Skip to content

Instantly share code, notes, and snippets.

View lgarron's full-sized avatar
💭
😼

Lucas Garron lgarron

💭
😼
View GitHub Profile

Keybase proof

I hereby claim:

  • I am lgarron on github.
  • I am lgarron (https://keybase.io/lgarron) on keybase.
  • I have a public key whose fingerprint is 7B61 7BC1 5F73 8A2A 3D90 13B1 E3EE C254 3880 CAE7

To claim this, I am signing this object:

@lgarron
lgarron / captive-portal-testing.md
Last active August 29, 2015 14:13
Chrome Captive Portal Testing

Add the following line to /etc/hosts (remember to undo this):

127.0.0.1 www.gstatic.com

Run a simple server on port 80. Here's a command you can run from bash:

cat <<EOF | sudo python -
import SocketServer
import SimpleHTTPServer

class CustomHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):

@lgarron
lgarron / gist:aa2b0220a90e1b46aa4a
Last active August 29, 2015 14:15
Google Groups Markdown Link Generator
/*
Convert to a bookmarklet using: http://chriszarate.github.io/bookmarkleter/
*/
prompt("Link", "[" + document.getElementById("t-t").innerHTML + "](" + location.href.replace("?utm_medium=email&utm_source=footer", "") + ")")
@lgarron
lgarron / publish-playlist.sh
Created May 29, 2011 00:15
Publish iTunes Playlist over Dropbox
#!/bin/bash
#
# Lucas Garron
# May 28, 2011
#
# ISSUES
# - Duplicate file names.
PUBLICFOLDER="/Users/lgarron/Dropbox/Public/"
DROPBOXID="13568303"
@lgarron
lgarron / mathematica_copy.m
Created June 18, 2011 16:01
Mathematica Copy to Clipboard (Correctly)
Copy[text_] :=
With[{tempClipboardFile =
FileNameJoin[{$TemporaryDirectory,
"mathematica_clipboard_temp.txt"}]},
Export[tempClipboardFile, text, "text"];
Run["cat " <> tempClipboardFile <> " | pbcopy"];
]
@lgarron
lgarron / md2html
Created August 2, 2011 23:12
md2html
#!/bin/bash
# Markdown Pretty Self-Contained HTML Generation Script
# By Lucas Garron
MARKDOWN_PATH="/usr/local/bin/markdown"
IN_FILE_PATH="$1"
IN_FILE_NAME=`basename "$IN_FILE_PATH"`
OUT_FILE_PATH="$IN_FILE_PATH.auto.html"
function printStatus {
@lgarron
lgarron / dabblet.css
Created December 31, 2011 23:15
Loading bar
/**
* Loading bar
*/
body {
background-color: #8DD;
background-image: repeating-linear-gradient(-45deg, transparent, transparent 15px, rgba(255,255,255,.5) 15px, rgba(255,255,255,.5) 30px);
animation: loading_scramble_frames 4s infinite linear;
background-size: 128px 128px;
}
@lgarron
lgarron / dabblet.css
Created January 6, 2012 01:52
Loading bar
/**
* Loading bar
*/
body {
background-color: #8DD;
background-image: repeating-linear-gradient(-45deg, transparent, transparent 15px, rgba(255,255,255,.5) 15px, rgba(255,255,255,.5) 30px);
animation: scrolling 4s infinite linear;
background-size: 128px 128px;
}
@lgarron
lgarron / quine.js
Created March 22, 2012 01:50
Javascript Quine
// Very inelegant right now.
(function(q){return q.substr(0, q.length-1)+String.fromCharCode(39)+q+String.fromCharCode(39)+q.substr(q.length-1, q.length);})('(function(q){return q.substr(0, q.length-2)+String.fromCharCode(39)+q+String.fromCharCode(39)+q.substr(q.length-2, q.length);})()')

Clipboard Module Security (Writing to Disk)

Right now, the Clipboard Module for Quicksilver writes/caches clipboard data to disk in a few ways, e.g. here. Depending on your system, this data could grow to several megabytes and may be backed up unencrypted onto Time Machine or synced online via Dropbox. If you ever copy-and-paste complicate passwords or other sensitive data, you may consider this a significant security risk.

Hack to prevent Quicksiler from writing clipboard data to disk

  1. Set the following directories to read-only:

Directories: