This file contains 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
/** | |
* Convert From/To Binary/Decimal/Hexadecimal in JavaScript | |
* https://gist.github.com/faisalman | |
* https://gist.github.com/AndreasHeiberg | |
* | |
* Copyright 2012-2015, Faisalman <fyzlman@gmail.com> | |
* Licensed under The MIT License | |
* http://www.opensource.org/licenses/mit-license | |
*/ |
This file contains 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
# ***************************************************************************** | |
# BASICS | |
# ***************************************************************************** | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# ***************************************************************************** |
This file contains 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
install go and openssl | |
mac os x: brew install go openssl | |
Generate private key and certificate signing request | |
openssl genrsa -des3 -passout pass:x -out server.pass.key 2048 | |
openssl rsa -passin pass:x -in server.pass.key -out server.key | |
rm server.pass.key | |
openssl req -new -key server.key -out server.csr |
This file contains 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
'use strict' | |
function sum(a, b) { | |
return a+b | |
} | |
function mul(a, b) { | |
return a*b | |
} |
This file contains 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
background: linear-gradient(299deg, #00e6ab, #cce600, #9300e6); | |
background-size: 600% 600%; | |
-webkit-animation: AnimationName 29s ease infinite; | |
-moz-animation: AnimationName 29s ease infinite; | |
-o-animation: AnimationName 29s ease infinite; | |
animation: AnimationName 29s ease infinite; | |
@-webkit-keyframes AnimationName { | |
0%{background-position:0% 50%} | |
50%{background-position:100% 50%} | |
100%{background-position:0% 50%} |
This file contains 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
server { | |
listen [::]:80; | |
listen 80; | |
server_name koa-todo.something.com ; | |
access_log /var/log/nginx/koa-todo-access.log; | |
error_log /var/log/nginx/koa-todo-error.log; | |
location / { | |
gzip on; |