Skip to content

Instantly share code, notes, and snippets.

View reactima's full-sized avatar

Ilya Elias Sidorov reactima

View GitHub Profile
@reactima
reactima / baseConverter.js
Created June 17, 2018 13:33 — forked from andheiberg/baseConverter.js
Convert From/To Binary/Decimal/Hexadecimal in JavaScript
/**
* 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
*/
@reactima
reactima / redis-cheat.bash
Created March 22, 2018 20:43
redis-cli cheat
# *****************************************************************************
# BASICS
# *****************************************************************************
redis-server /path/redis.conf # start redis with the related configuration file
redis-cli # opens a redis prompt
# *****************************************************************************
@reactima
reactima / create cert.txt
Last active January 28, 2023 14:41 — forked from scrivy/create cert.txt
self signed https localhost proxy with golang
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
@reactima
reactima / yield-vs-await.js
Last active January 22, 2016 00:34
why i don't like yield? await a + await b to mean (await a) + (await b), but yield a + yield b means yield (a + (yield b))
'use strict'
function sum(a, b) {
return a+b
}
function mul(a, b) {
return a*b
}
@reactima
reactima / my.css
Last active January 8, 2016 17:48 — forked from anonymous/my.css
CSS Gradient Animation http://www.gradient-animator.com/
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%}
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;