An Alloy Widget to to create welcome pages like AirBnB application. https://github.com/bduyng/com.bduyng.intropages
Image viewer widget for Appcelerator Titanium https://github.com/apra-informatica/Ti.ImageViewer
<?php | |
Route::get('oauth/client', function() { | |
$url = OAUTH_DOMAIN . '/oauth/access_token'; | |
$post = [ | |
'grant_type' => 'authorization_code', | |
'code' => Input::get('code'), | |
'redirect_uri' => OAUTH_REDIRECT_URI, | |
'client_id' => OAUTH_ID, |
var Leap = require('/usr/local/lib/node_modules/leapjs'); | |
var Crypto = require("crypto"); | |
var hash = Crypto.createHash("md5"); | |
var hashCount = 0; | |
Leap.loop(function(frame){ | |
if (frame.hands && frame.hands.length > 0) { | |
var h = frame.hands[0]; |
(function() { | |
var filterName = new RegExp(prompt("Insert the regex"), 'i'); | |
if (!filterName) { | |
return alert('Invalid regex'); | |
} | |
var MAX_ITERATIONS = 500; | |
var $profileNode = document.querySelector('[title="Profile"] > span'); |
<?php | |
add_action( 'admin_init', function() { | |
$option = 'test'; | |
register_setting('general', $option, 'esc_attr'); | |
add_settings_field($option, 'Test', function() use ($option) { | |
$value = get_option($option, ''); | |
echo '<input type="text" id="' . $option . '" name="' . $option . '" value="' . esc_attr($value) . '" />'; | |
}, 'general'); | |
}); |
function x(a,b,c) { | |
console.log('Called X:', a,b,c); | |
} | |
Function.prototype._call = function() { | |
var first = Array.prototype.shift.apply(arguments); | |
this.apply(first, arguments); | |
}; | |
Function.prototype._apply = function() { |
An Alloy Widget to to create welcome pages like AirBnB application. https://github.com/bduyng/com.bduyng.intropages
Image viewer widget for Appcelerator Titanium https://github.com/apra-informatica/Ti.ImageViewer
<?php | |
if (preg_match("/^\/proxy\/(.+)$/", $_SERVER['REQUEST_URI'], $match)) { | |
$ch = curl_init(); | |
curl_setopt($ch, CURLOPT_URL, "http://api.com/" . $match[1]); | |
curl_setopt($ch, CURLOPT_USERAGENT, 'Proxy'); | |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5); | |
curl_setopt($ch, CURLOPT_TIMEOUT, 5); | |
die(curl_exec($ch)); |
#!/usr/bin/env phantomjs | |
var args = require('system').args; | |
var URL = args[1]; | |
var FILE = args[2]; | |
var W = args[3]; | |
var H = args[4]; | |
if (URL && FILE && W && H) { |
<?php | |
function wp_asset($type, $key, $url, $deps = null) { | |
call_user_func("wp_deregister_$type", $key); | |
call_user_func("wp_enqueue_$type", $key, $url, $deps, filemtime(__FILE__)); | |
} | |
// Usage: | |
// wp_asset('script', 'jquery', '/assets/js/jquery.js', []); |
element._addEventListener = element.addEventListener; | |
element._removeEventListener = element.removeEventListener; | |
element.addEventListener = function(e,c) { | |
element._listeners[e] = element._listeners[e] || []; | |
element._listeners[e].push(c); | |
element._addEventListener(e,c); | |
}; | |
element.removeEventListener = function(e,c) { |