Skip to content

Instantly share code, notes, and snippets.

View NeilHanlon's full-sized avatar

Neil Hanlon NeilHanlon

View GitHub Profile
[Sun Dec 02 02:44:08 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: enctype in /home/neil/Documents/sdbeta/templates_c/9ad6fa69c8fb57af442443d3d89c96f1c634f2f7.file.form.tpl.php on line 36, referer: http://127.0.0.1/sdbeta/index.php?p=site&c=user&m=register
[Sun Dec 02 02:44:08 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: maxlength in /home/neil/Documents/sdbeta/templates_c/9ad6fa69c8fb57af442443d3d89c96f1c634f2f7.file.form.tpl.php on line 62, referer: http://127.0.0.1/sdbeta/index.php?p=site&c=user&m=register
[Sun Dec 02 02:44:08 2012] [error] [client 127.0.0.1] PHP Notice: Undefined index: label in /home/neil/Documents/sdbeta/templates_c/9ad6fa69c8fb57af442443d3d89c96f1c634f2f7.file.form.tpl.php on line 144, referer: http://127.0.0.1/sdbeta/index.php?p=site&c=user&m=register
package NeilHanlon;
import java.util.Calendar;
import javax.swing.JOptionPane;
import NeilHanlon.playClip;
import java.io.*;
import javax.sound.sampled.*;
/**
* @author Neil
package NeilHanlon;
import java.util.Calendar;
import javax.swing.JOptionPane;
import NeilHanlon.playClip;
import java.io.*;
import javax.sound.sampled.*;
/**
* @author Neil
$(document).ready(function(){
var addresses = $doSomeAjaxShitHere, //This would be populated by an AJAX function which returns a JSON formatted multi-dimesional array with the addressID as the key.
form = $("#idOf-Form"); //replace idOf-Form with the form's ID.
$('body').on('click','#button',function(){ //here we do a hacky-bind to the click of #button, since it's in a modal. Replace #button with the button's id
var addressID = $(this).attr('data-addressID'); // this gets the addressID from the data-addressID attribute
form.find('input[name=something]').val(addresses[addressID].something); //Repeat this for each form element, substituting name=something for name=whatever field, and the .something to the corresponding form input name.
});
});
package com.snapchat.android.util;
import javax.crypto.Cipher;
import javax.crypto.spec.SecretKeySpec;
public class AESEncrypt
{
public static String ENCRYPT_KEY = "1234567891123456";
public static String ENCRYPT_KEY_2 = "M02cnQ51Ji97vwT4";
(function(){
// make a copy of the native window.print
var _print = this.print;
// create a new window.print
window.print = function (window) {
// if `onbeforeprint` exists, call it.
if(this.onbeforeprint) onbeforeprint(this);
// call the original `window.print`.
(function(){
var oldPrint = window.print;
var slice = Array.prototype.slice;
window.print = function () {
if (typeof window.onbeforeprint === "function") {
window.onbeforeprint.apply(this, slice.call(arguments));
}
oldPrint.apply(this, slice.call(arguments));
if (typeof window.onafterprint === "function") {
@NeilHanlon
NeilHanlon / 3.cpp
Last active December 19, 2015 02:48
#include <iostream>
#include <algorithm>
#include <ios>
#include <map>
#include <sstream>
#include <cstring>
using namespace std;
int main(){
root@debian:/home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0# make
make -C tools
make[1]: Entering directory `/home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0/tools'
/home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0/tools/bin2h
cp -f os/linux/Makefile.6 /home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0/os/linux/Makefile
make -C /lib/modules/3.2.0-4-amd64/build SUBDIRS=/home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0/os/linux modules
make[1]: Entering directory `/lib/modules/3.2.0-4-amd64/build'
make[1]: *** No rule to make target `modules'. Stop.
root@debian:/home/neil/2010_07_16_RT2860_Linux_STA_v2.4.0.0# lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0100] (rev 09)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200/2nd Generation Core Processor Family PCI Express Root Port [8086:0101] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family MEI Controller #1 [8086:1c3a] (rev 04)
00:1a.0 USB controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 05)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 05)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b5)
00:1c.4 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev b5)
00:1c.6 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Fam