Skip to content

Instantly share code, notes, and snippets.

@sunary
sunary / dot.vn
Last active May 10, 2017 09:18
3 letters dot .vn domain avaliable
aae
aah
aai
aaj
aan
aao
aap
aaq
aax
aay
@sunary
sunary / docker.sh
Last active December 24, 2017 05:32
docker tips
# build
docker build -t=image_name .
# start
docker run -d -p PORT:PORT image_name
# exec
docker exec -it container_name /bin/bash
# tag
@sunary
sunary / crypto400.py
Last active December 25, 2015 02:09
crypto400.py
from sympy import *
from sympy import pdiv, prem
from sympy.abc import x
from random import random, choice, randint
from string import ascii_letters, digits
import sys
import os
import binascii
import threading
import Queue
@sunary
sunary / tips.sql
Last active July 25, 2017 05:06
mysql postgreSQL utils (python)
## Create table
id int(11) NOT NULL AUTO_INCREMENT
elements integer[4]
title TEXT CHARACTER SET utf8 NOT NULL
source VARCHAR(100) CHARACTER SET utf8 NOT NULL
doc_id INT REFERENCES documents ON DELETE CASCADE
review set('positive', 'negative', 'neutral') COMMENT '",".join(data) when query'
@sunary
sunary / common-cmd.sh
Last active May 12, 2020 21:02
usually commands
# rsync
rsync -rzvh --exclude='*.git' --exclude='*.pyc' -e 'ssh -p PORT' SRC [USER@]HOST:/home/user/
rsync -r ~/Music/iTunes/iTunes\ Media/Music ~/Documents/OneDrive/
# Start mongo
mongod --config /usr/local/etc/mongod.conf --fork
# supervisord
supervisord.conf /etc/supervisor/conf.d/supervisord.conf