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
$('#combobox').change(function(){ | |
var idx = $(this)[0].selectedIndex; | |
console.log(idx); | |
}); |
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 pre_debug($data){ | |
echo '<pre>'.print_r($data, true).'</pre>'; | |
} |
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
git config --global -e |
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
<script> | |
<?php | |
echo "var data = ".json_encode($data).";"; | |
?> | |
</script> |
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 debug_post(){ | |
echo '<pre>'.print_r($_POST, true).'</pre>'; | |
} |
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
/* | |
--- combobox with icon --- | |
<div class="control has-icon"> | |
<div class="select is-fullwidth"> | |
<select name='my_cbb'> | |
<option value='1'>value 1</option> | |
<option value='2'>value 2</option> | |
<option value='3'>value 3</option> | |
</select> | |
</div> |
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
import requests | |
import urllib | |
tag = 'person' | |
url = "https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=881cbcfeb398828ea12b253c1743224e&text=%s&format=json&nojsoncallback=1" % tag | |
proxies = {'http': 'http://your.proxy:port/'} | |
r = requests.get(url) | |
image = urllib.URLopener(proxies) |
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 // require initialize $pdo from outside | |
class EzDb { | |
// init pdo function | |
public static function init_pdo($host, $db_name, $user, $pass){ | |
global $pdo; | |
return new PDO( | |
"mysql:host=$host;dbname=$db_name;charset=utf8", | |
$user, | |
$pass, |
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
[user] | |
name = diewland | |
email = [email protected] | |
[alias] | |
st = status | |
ci = commit | |
br = branch | |
co = checkout | |
l = log --graph --decorate --pretty=oneline --abbrev-commit -n 10 | |
ll = log --graph --decorate --pretty=oneline --abbrev-commit --all |
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
# ---------------- | |
# http://forum.xda-developers.com/showthread.php?t=2278508 | |
# http://forum.xda-developers.com/showthread.php?t=2294786 | |
# | |
# (require root) | |
# reset | |
wm size reset | |
wm density reset | |
wm overscan reset |