Skip to content

Instantly share code, notes, and snippets.

View king6cong's full-sized avatar

wangcong king6cong

View GitHub Profile
import hashlib
def hash_passwd(passwd, salt):
return 'sha256$' + hashlib.sha256(passwd + salt).hexdigest()
SALT = "this is a secret and do not share with others"
# use case:
#!/bin/bash
# Build latest version of Emacs, version management with stow
# OS: Ubuntu 14.04 LTS
# version: 24.5
# Toolkit: lucid
# Warning, use updated version of this script in: https://github.com/favadi/build-emacs
set -e
(load "~/repos/toutiao_config/package_list.el")
(if (>= emacs-major-version 24)
(progn
(package-initialize)
(package-refresh-contents)
(when (not (require 'magit nil t))
(package-install 'magit))
(when (not (require 'go-mode nil t))
(package-install 'go-mode))