This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var id = "hi"; | |
doifconnected(function(id){ | |
alert(id); | |
}, id); | |
function doifconnected(callback, id){ | |
setTimeout(function(){ | |
if(1 == 1) { | |
callback(id); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
[ | |
{ "keys": ["ctrl+t"], "command": "exec", "args": { "cmd": ["C:\\newtab.bat"]} } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var retina = window.devicePixelRatio > 1 ? true : false; | |
if(retina) { | |
$("html").addClass("retina"); | |
$('img').each(function(){ | |
$(this).attr("src", $(this).attr("src").replace("/l/", "/h/")); | |
}); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// wp-admin/admin-ajax.php?action=getspeaker&a=b&c=d... | |
add_action( 'wp_ajax_nopriv_getspeaker', 'getspeaker' ); | |
add_action( 'wp_ajax_getspeaker', 'getspeaker' ); | |
function getspeaker(){ | |
$offset = $_REQUEST['offset']; | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
header('Cache-Control: no-cache'); | |
header('Content-Type: text/event-stream'); | |
$data = ''; | |
// do stuff, get $something | |
$result = db_query('SELECT COUNT(*) as count FROM users WHERE last_login > date_add(current_timestamp, interval -15 minute)'); | |
$usercount = db_fetch_array($result)[0]->count; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
set ip_address_string="IPv4 Address" | |
for /f "usebackq tokens=2 delims=:" %%f in (`ipconfig ^| findstr /c:%ip_address_string%`) do ( | |
start C:\Users\User\AppData\Local\Google\Chrome\Application\chrome.exe http://%%f:8080 | |
"C:\Program Files (x86)\nodejs\node.exe" node_modules\weinre\weinre\ --boundHost -all- | |
goto :eof | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//responsive images | |
retina = window.devicePixelRatio > 1 ? true : false; | |
var l = "l"; | |
if(retina) { | |
$("html").addClass("retina"); | |
l = 'h'; | |
$('img').each(function(){ | |
$(this).attr("src", $(this).attr("src").replace("/l/", "/h/")); | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
javascript:(function(){ jQuery.fn.referrer = function() { return jQuery(document).prop("referrer").toString(); }; alert(jQuery().referrer()); })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function preload(source) { | |
var i = new Image(); | |
i.src = source; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function setup() | |
displayMode(STANDARD) | |
availableScenes = { Scene1() } | |
currentScene = availableScenes[1] | |
iparameter("SceneSelect",1,#availableScenes,1) | |
parameter("Size",50,500,150) |