Colors of social brands is [here][2]
Facebook Share
http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwebsite.com&t=url%20encoded%20text
Facebook Like Button
http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwebsite.com
| /** | |
| * Get a random floating point number between `min` and `max`. | |
| * | |
| * @param {number} min - min number | |
| * @param {number} max - max number | |
| * @return {float} a random floating point number | |
| */ | |
| function getRandom(min, max) { | |
| return Math.random() * (max - min) + min; | |
| } |
| function urlObject(options) { | |
| "use strict"; | |
| /*global window, document*/ | |
| var url_search_arr, | |
| option_key, | |
| i, | |
| urlObj, | |
| get_param, | |
| key, |
| #!/bin/bash | |
| ROOT_PASSWORD=$(zenity --password --title "Enter root password") | |
| if [ "${ROOT_PASSWORD}" ]; then | |
| echo $ROOT_PASSWORD | sudo -S echo "TEST" > ./test.txt | |
| fi |
| //Node.js build for pandoc convert md 2 rst | |
| { | |
| "shell_cmd": "pandoc -f markdown -t rst $file > $file_path/$file_base_name.rst" | |
| } |
| /* This work is licensed under Creative Commons GNU LGPL License. | |
| License: http://creativecommons.org/licenses/LGPL/2.1/ | |
| Version: 0.9/modified to conform to commonjs modules pattern | |
| Author: Stefan Goessner/2006 | |
| Web: http://goessner.net/ | |
| */ | |
| var json2xml = (typeof exports === 'undefined')? {} : exports; // like commonjs |
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| async function demo() { | |
| console.log('Taking a break...'); | |
| await sleep(2000); | |
| console.log('Two second later'); | |
| } |
| var obj = new Proxy({}, { | |
| get: function (target, key, receiver) { | |
| console.log(`getting ${key}!`); | |
| return Reflect.get(target, key, receiver); | |
| }, | |
| set: function (target, key, value, receiver) { | |
| console.log(`setting ${key}!`); | |
| return Reflect.set(target, key, value, receiver); | |
| } | |
| }); |
| #!/bin/bash | |
| port=9100 | |
| echo {1..255}.{0..255}.{0..255}.{0..255}:${port} | sed 's/\s/\n/g' |
| # upgrade nginx | |
| sudo add-apt-repository ppa:nginx/stable | |
| sudo apt-get update | |
| sudo apt-get install nginx | |
| # cache | |
| proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g | |
| inactive=60m use_temp_path=off; | |
| server { |