Skip to content

Instantly share code, notes, and snippets.

$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'] ;
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 January 24, 2011 08:14
apollo.site5.com
$ 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
//object literal
var NotArray = {
addItem: function(key, val) {
NotArray.key = val;
},
getItem: function(key) {
return NotArray.key;
}
}
var key = [];
var val = [];
var hashtable = [];
var i = 0;
function add(k,v){
//Hashtable[k] = val.length;
sub = [k, i];
hashtable.push(sub);
var key = [];
var val = [];
var Hashtable = new Object();
function addItem(k,v){
Hashtable[k] = val.length;
key.push(k);
val.push(v);
}
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];
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 October 30, 2011 00:14
Broadcasting with socket.io
<!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 October 30, 2011 07:18
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.
{
"beforeunload":
{
"bubbles":"no",
"cancel":"yes",
"nosupport":{"opera":"*"}
},
"blur":
{
"bubbles":"no",