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 | |
function _b64enc($in, $padding = false) | |
{ | |
$inLen = count($in); | |
$out = []; | |
for ($i = 0; $i < $inLen; $i += 3) | |
{ | |
$out[] = $in[$i] >> 2; | |
if ($i + 1 < $inLen) |
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
Coordinate to address: | |
http://maps.googleapis.com/maps/api/geocode/json?latlng=44.4647452,7.3553838&language=en | |
Parse address: | |
http://maps.googleapis.com/maps/api/geocode/json?address=xxxx | |
Distance of meter between 2 coordinates | |
http://stackoverflow.com/a/11172685 |
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
// cursor moving | |
// http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html | |
static void updateProgress(int currentIndex, int total) { | |
final int width = 25; // progress bar width in chars | |
float percentage = (float) currentIndex / (float) total; | |
int currProgress = (int) Math.floor(percentage * width); | |
int remainProgress = width - currProgress; | |
String numCurr = new String(new char[currProgress]).replace("\0", "="); | |
if (numCurr.length() > 0) | |
numCurr = numCurr.substring(0, numCurr.length() - 1) + ">"; |
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
# aikon core, copyright 2015&+ nodegin, version 3 | |
class Aikon | |
base: 'https://na.cx/i/' | |
icons: {} | |
defc: ['[369]','#adore#','#yup#','O:-)',':-[','#ass#','[banghead]',':document','[bomb]','[bouncer]','[bouncy]','#bye#','[censored]','#cn#',':o)',':~(','xx(',':-]','#ng#','#fire#','[flowerface]',':-(','fuck','@_@','#good#','#hehe#','#hoho#','#kill2#','#kill#','^3^','#love#','#no#','[offtopic]',':O','[photo]','[shocking]','[slick]',':)','[sosad]','#oh#',':P',';-)','???','?_?','[yipes]','Z_Z','#lol#'] | |
defi: ['369', 'adore', 'agree', 'angel', 'angry', 'ass', 'banghead', 'biggrin', 'bomb', 'bouncer', 'bouncy', 'bye', 'censored', 'chicken', 'clown', 'cry', 'dead', 'devil', 'donno', 'fire', 'flowerface', 'frown', 'fuck', '@', 'good', 'hehe', 'hoho', 'kill2', 'kill', 'kiss', 'love', 'no', 'offtopic', 'oh', 'photo', 'shocking', 'slick', 'smile', 'sosad', 'surprise', 'tongue', 'wink', 'wonder2', 'wonder', 'yipes', 'z', 'lol'] | |
init: (data)=> | |
# add icon buttons | |
frag = document.createDocumentFragment() |
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
[Unit] | |
Description=nginx | |
After=syslog.target network.target remote-fs.target nss-lookup.target | |
[Service] | |
Type=forking | |
TimeoutSec=120 | |
User=root | |
Group=root | |
SyslogIdentifier=nginx |
NewerOlder