| #!/usr/bin/env node | |
| console.log('yay gist') |
| # bash commands | |
| # lists all of your conda env | |
| conda env list | |
| # Create a conda env w/ python3.5 | |
| # -n sets the name for your new env. I call it neovim here | |
| conda create -n neovim python=3.5 | |
| # add neovim for python3 to the env | |
| # specify version you want here, 0.1.13 up to date ver atm |
| rm -rf ~/.zprezto ~/.zlogin ~/.zlogout ~/.zpreztorc ~/.zprofile ~/.zshenv |
based on https://www.reddit.com/r/vim/comments/24g8r8/italics_in_terminal_vim_and_tmux/
- Check if italic font is supported:
$ echo -e "\e[3mitalic\e[23m"
- Also check:
$ infocmp $TERM | grep sitm
sgr0=\E(B\E[m, sitm=\E[3m, smacs=\E(0, smam=\E[?7h,
| -- STR_TO_MAP 사용법 | |
| SELECT STR_TO_MAP("key1: value1, key2: value2, key3: value3", list_delimiter, key_value_delimiter); | |
| -- example #1 | |
| hive> SELECT STR_TO_MAP("key1: value1, key2: value2, key3: value3", ",", ":"); | |
| OK | |
| {"key1":" value1"," key3":" value3"," key2":" value2"} | |
| Time taken: 0.049 seconds, Fetched: 1 row(s) | |
| -- json string to map |
Cross-origin resource sharing (CORS) is a mechanism that allows restricted resources (e.g. fonts) on a web page to be requested from another domain outside the domain from which the first resource was served. This is set on the server-side and there is nothing you can do from the client-side to change that setting, that is up to the server/API. There are some ways to get around it tho.
Sources : MDN - HTTP Access Control | Wiki - CORS
CORS is set server-side by supplying each request with additional headers which allow requests to be requested outside of the own domain, for example to your localhost. This is primarily set by the header:
Access-Control-Allow-Origin| #include <cassert> | |
| #include <leveldb/db.h> | |
| #include <iostream> | |
| #include <string> | |
| using namespace std; | |
| int main() { | |
| leveldb::DB* db; | |
| leveldb::Options options; | |
| options.create_if_missing = true; |
Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.
- TCP port 2377 for cluster management & raft sync communications
- TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
- UDP port 4789 for "data plane" VXLAN overlay network traffic
- IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option