Skip to content

Instantly share code, notes, and snippets.

Luke Arduini luk-

Block or report user

Report or block luk-

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:129491
$sql = mysql_query("select * from wp_comments where comment_post_id=61");
$row = mysql_fetch_array($sql);
$sql2 = mysql_query("select * from wp_comments where comment_author='$row['comment_author']'") ;
$row2 = mysql_fetch_array($sql2) ;
echo $row2['user_id'] ;
View gist:152195
MX Server address Priority
ASPMX.L.GOOGLE.COM. 10
ALT1.ASPMX.L.GOOGLE.COM. 20
ALT2.ASPMX.L.GOOGLE.COM. 20
ASPMX2.GOOGLEMAIL.COM. 30
ASPMX3.GOOGLEMAIL.COM. 30
ASPMX4.GOOGLEMAIL.COM. 30
ASPMX5.GOOGLEMAIL.COM. 30
@luk-
luk- / gist:792961
Created Jan 24, 2011
apollo.site5.com
View gist:792961
$ vim --version
VIM - Vi IMproved 6.3 (2004 June 7, compiled Jun 1 2009 11:13:14)
Included patches: 1-21, 23-24, 26, 28-34, 36-37, 39-40, 42-43, 45-46, 59, 81-82
Compiled by <bugzilla@redhat.com>
Tiny version without GUI. Features included (+) or not (-):
-arabic -autocmd -balloon_eval -browse +builtin_terms -byte_offset -cindent
-clientserver -clipboard -cmdline_compl -cmdline_hist -cmdline_info -comments
-cryptv -cscope -dialog -diff -digraphs -dnd -ebcdic -emacs_tags -eval
-ex_extra -extra_search -farsi -file_in_path -find_in_path -folding -footer
+fork() -gettext -hangul_input +iconv -insert_expand -jumplist -keymap -langmap
View gist:886236
//object literal
var NotArray = {
addItem: function(key, val) {
NotArray.key = val;
},
getItem: function(key) {
return NotArray.key;
}
}
View gist:887785
var key = [];
var val = [];
var Hashtable = new Object();
function addItem(k,v){
Hashtable[k] = val.length;
key.push(k);
val.push(v);
}
View gist:887959
var key = [];
var val = [];
var hashtable = [];
var i = 0;
function add(k,v){
//Hashtable[k] = val.length;
sub = [k, i];
hashtable.push(sub);
View gist:891226
function create(size){
return new Array(size);
}
function hash(array, key){
var h = parseInt(key, 36) % array.length;
return h;
}
function set(array, k, v){
var pair = [k,v];
View gist:941872
class FizzBuzz
def initialize (n)
@n = n
end
def to_s
return "fizzbuzz" if fizzbuzz?
return "fizz" if fizz?
return "buzz" if buzz?
@luk-
luk- / index.html
Created Oct 30, 2011
Broadcasting with socket.io
View index.html
<!DOCTYPE html>
<head>
<script src="/socket.io/socket.io.js"></script>
<script>
var socket = io.connect('/');
socket.on('bc', function (data) {
console.log(data);
window.document.write(data.bc + '<br />');
});
socket.on('dc', function (data) {
@luk-
luk- / events.json
Created Oct 30, 2011
JSON object of the *most* browser-compatible events you'll listen for. To make the list, the event had to support Webkit browsers and Firefox.
View events.json
{
"beforeunload":
{
"bubbles":"no",
"cancel":"yes",
"nosupport":{"opera":"*"}
},
"blur":
{
"bubbles":"no",
You can’t perform that action at this time.