Skip to content

Instantly share code, notes, and snippets.

View donatj's full-sized avatar
🥽
Getting back to business

Jesse Donat donatj

🥽
Getting back to business
View GitHub Profile
@donatj
donatj / # lastpass-cli - 2016-08-31_12-03-38.txt
Created August 31, 2016 17:08
lastpass-cli on Mac OS X 10.11.6 - Homebrew build logs
Homebrew build logs for lastpass-cli on Mac OS X 10.11.6
Build date: 2016-08-31 12:03:38
jdonat > JesseDonat-MBPrd ~/Sites/myon ±dev⚡ » brew install lastpass-cli --with-pinentry --with-doc 12:03:07
==> Installing dependencies for lastpass-cli: docbook, asciidoc, libgpg-error, libassuan, pinentry
==> Installing lastpass-cli dependency: docbook
==> Downloading https://homebrew.bintray.com/bottles/docbook-5.0.el_capitan.bottle.3.tar.gz
######################################################################## 100.0%
==> Pouring docbook-5.0.el_capitan.bottle.3.tar.gz
==> Using the sandbox
==> xmlcatalog --noout --create /usr/local/etc/xml/catalog
==> xmlcatalog --noout --del file:///usr/local/Cellar/docbook/5.0/docbook/xml/4.2/catalog.xml /usr/local/etc/xml/catalog
==> xmlcatalog --noout --add nextCatalog file:///usr/local/Cellar/docbook/5.0/docbook/xml/4.2/catalog.xml /usr/local/etc/xml/catalog

Keybase proof

I hereby claim:

  • I am donatj on github.
  • I am donatj (https://keybase.io/donatj) on keybase.
  • I have a public key whose fingerprint is 74DD CFA8 9C3E 507F E14E 2809 4864 D96E 727F 69F9

To claim this, I am signing this object:

@donatj
donatj / cp-branch
Last active October 20, 2016 18:12
Easily cherry pick one or more commits to a new branch
#!/bin/zsh
set -e
if [ $# -lt 3 ]
then
echo "Not Enough Arguments"
return 1
fi
.g__font-family--Arial {
font-family: Arial;
}
.g__font-family--Tahoma {
font-family: Tahoma;
}
.g__font-family--serif {
font-family: serif;
@donatj
donatj / QuerySampler.php
Created December 15, 2014 23:37
Dead Simple Query Sampler
<?php
$timeout = 1800; //seconds
$sleep = 100000; //microseconds
$start = time();
$link = mysql_connect('[[HOST]]', '[[USERNAME]]', '[[PASSWORD]]');
if( !$link ) {
die('Could not connect: ' . mysql_error());
}
@donatj
donatj / arrays_are_similar.php
Created July 22, 2014 22:16
Similar Array Checker - Regardless of Key Order
<?php
function arrays_are_similar( $aSide, $bSide ) {
$keys = array_unique(array_merge(
array_keys($aSide),
array_keys($bSide)
));
foreach( $keys as $key ) {
@donatj
donatj / 256color.php
Created April 4, 2013 20:17
Nearest Terminal Color Calculator
<?php
$CLUT = array(
'00' => array( 0, 0, 0 ), '01' => array( 128, 0, 0 ),
'02' => array( 0, 128, 0 ), '03' => array( 128, 128, 0 ),
'04' => array( 0, 0, 128 ), '05' => array( 128, 0, 128 ),
'06' => array( 0, 128, 128 ), '07' => array( 192, 192, 192 ),
'08' => array( 128, 128, 128 ), '09' => array( 255, 0, 0 ),
'10' => array( 0, 255, 0 ), '11' => array( 255, 255, 0 ),
'12' => array( 0, 0, 255 ), '13' => array( 255, 0, 255 ),
@donatj
donatj / debug.css
Created April 20, 2012 21:38
Pure CSS Debuggery
*[class]:before {
position: absolute;
background: rgba(10,10,10,.6);
padding: 10px;
border-radius: 4px;
color: white;
font-size: 10px;
display: block;
content: "[" attr(class) "] " ;
}
@donatj
donatj / matlock.php
Created February 23, 2012 20:46
Slow Query Log Parser
#!/usr/bin/php
<?php
$file = false;
$defaults = array(
'maxQueryTime' => pow(2,32),
'minQueryTime' => 0,
'maxLockTime' => pow(2,32),
'minLockTime' => 0,
'maxRowsSent' => pow(2,32),
'minRowsSent' => 0,