most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat
[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 |
# 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() |
// 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) + ">"; |
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 |
<?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) |
(function(h){function p(a){if("number"===typeof a)return a.toString();var f={"<":"lt",">":"gt",'"':"quot","'":"apos"},c;for(c in f)a=a.replace(new RegExp(c,"g"),"&"+f[c]+";");return a}function t(a,f){var c=[],b;if("undefined"!=typeof a.unshift){var k=a.length;for(b=0;b<k;b++)if("undefined"!=typeof a[b]){var e=f.call(this,a[b],b);null!==e&&c.push(e)}}else for(b in a)a.hasOwnProperty(b)&&(e=f.call(this,a[b],b),null!==e&&c.push(e));return c}function u(a,f,c){for(var b in a)a.hasOwnProperty(b)&&(c=f.call(this, | |
c,a[b],b));return c}function r(a,f,c,b){if("undefined"===typeof b||null===b)b="";"object"===typeof f&&(f=t(f,function(a,b){switch(b){case "transform":return;case "fill":if(a.match(/^hsb/)){var c=a.replace(/^hsb\(|\)$/g,"").split(",");3===c.length&&(a=h.hsb2rgb(c[0],c[1],c[2]).toString())}}return b+'="'+p(a)+'"'}).join(" "));return"<"+a+(c?' transform="matrix('+c.toString().replace(/^matrix\(|\)$/g,"")+')" ':" ")+f+">"+b+"</"+a+">"}function w(a){return{font:{family:"undefined"===typeof a.attrs.font? | |
null:a.a |
server { | |
listen 8080 default_server; | |
listen [::]:8080 default_server ipv6only=on; | |
root /home/ubuntu; | |
index index.php index.html index.htm; | |
server_name localhost; | |
location / { |
<?xml version="1.0" encoding="UTF-8" ?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.pf.plist</string> | |
<key>Program</key> | |
<string>/sbin/pfctl</string> | |
<key>ProgramArguments</key> | |
<array> |
yum -y install bitmap-fonts bitmap-fonts-cjk mkfontscale fontconfig | |
mkdir /usr/share/fonts/win/ | |
mv msjh.ttf /usr/share/fonts/win | |
cd /usr/share/fonts/win/ | |
mkfontscale | |
mkfontdir | |
fc-cache |