Skip to content

Instantly share code, notes, and snippets.

View lfaraone's full-sized avatar
💭
I may be slow to respond.

Luke Faraone lfaraone

💭
I may be slow to respond.
View GitHub Profile
root@utrs:/srv/utrs# mysql -D utrs -p < mysql_schema.sql
ERROR 1064 (42000) at line 166: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--HOOK TOOL
CREATE TABLE IF NOT EXISTS `hooks` (
`user_id` int(11) NOT NULL,
' at line 1
@lfaraone
lfaraone / gist:ec1405447f6abef2419e
Created September 26, 2015 03:06
keybase proof
### Keybase proof
I hereby claim:
* I am lfaraone on github.
* I am lfaraone (https://keybase.io/lfaraone) on keybase.
* I have a public key whose fingerprint is 8C82 3DED 10AA 8041 639E 1210 5ACE 8D6E 0C14 A470
To claim this, I am signing this object:
@lfaraone
lfaraone / chello.c
Last active August 29, 2015 14:28
go/PAM fail
#include <security/pam_modules.h>
#include "_cgo_export.h"
PAM_EXTERN int pam_sm_acct_mgmt(pam_handle_t* pamh, int flags, int argc, const char **argv) {
return PamAccountManagement(pamh, flags, argc, (char **)argv);
}
Aug 1 21:37:31 mbpec Installer[6746]: LSExceptions [0x7fde82d15070] loaded
Aug 1 21:37:31 mbpec Installer[6746]: @(#)PROGRAM:Install PROJECT:Install-1000
Aug 1 21:37:31 mbpec Installer[6746]: @(#)PROGRAM:Installer PROJECT:Installer-852
Aug 1 21:37:31 mbpec Installer[6746]: Hardware: MacBookPro11,2 @ 2.80 GHz (x 8), 16384 MB RAM
Aug 1 21:37:31 mbpec Installer[6746]: Running OS Build: Mac OS X 10.11 (15A215h)
Aug 1 21:37:31 mbpec Installer[6746]: Env: __CF_USER_TEXT_ENCODING=0x4AB68818:0x0:0x0
Aug 1 21:37:31 mbpec Installer[6746]: Env: TMPDIR=/var/folders/s_/v8h64v21247dhp77n4fq7r215bd20r/T/
Aug 1 21:37:31 mbpec Installer[6746]: Env: HOME=/Users/lfaraone
Aug 1 21:37:31 mbpec Installer[6746]: Env: SHELL=/bin/bash

Keybase proof

I hereby claim:

  • I am lfaraone on github.
  • I am lwf (https://keybase.io/lwf) on keybase.
  • I have a public key whose fingerprint is 5189 2A7D 16D0 49BB 046B DC77 9732 5DD8 F9FD D506

To claim this, I am signing this object:

@lfaraone
lfaraone / gmail_mid.js
Created February 19, 2014 19:22
Gmail message-ID / permalink finder
javascript:(function () {
gmonkey.load("1.0", function (gmail) {
if (gmail.getActiveViewType() !== "cv") {
alert("You need to be in a conversation view for this to work.");
return;
}
var xhr = new XMLHttpRequest();
var uri = "?ui=2&ik=" + GLOBALS[9] + "&view=om&th=" + document.location.hash.split("/").reverse()[0];
@lfaraone
lfaraone / Callback.java
Last active December 21, 2015 23:19
Example of using callbacks in Java This code executes this.doSomething and calls a user-specified callback when its finished. This is a synchronous method, but you could imagine that doSomething forked into a new thread and executed onTaskComplete later.
public interface Callback {
void run(Object result);
}