Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| apiVersion: apps/v1 | |
| kind: Deployment | |
| metadata: | |
| name: vosk | |
| spec: | |
| selector: | |
| matchLabels: | |
| app: vosk | |
| template: | |
| metadata: |
| # ref: https://play.golang.org/p/OeEmT_CXyO | |
| package main | |
| import ( | |
| "fmt" | |
| "runtime" | |
| "strconv" | |
| "strings" | |
| "sync" | |
| ) |
| brew install jansson libnice openssl libusrsctp libmicrohttpd libwebsockets cmake rabbitmq-c sofia-sip opus libogg glib pkg-config gengetopt | |
| wget https://github.com/cisco/libsrtp/archive/v1.5.4.tar.gz | |
| tar xvf v1.5.4.tar.gz | |
| cd libsrtp-1.5.4 | |
| ./configure --prefix=/usr/local/libsrtp | |
| make | |
| sudo make install | |
| git clone [email protected]:meetecho/janus-gateway.git |
| # One liner | |
| wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com | |
| # Explained | |
| wget \ | |
| --recursive \ # Download the whole site. | |
| --page-requisites \ # Get all assets/elements (CSS/JS/images). | |
| --adjust-extension \ # Save files with .html on the end. | |
| --span-hosts \ # Include necessary assets from offsite as well. | |
| --convert-links \ # Update links to still work in the static version. |
| #!/usr/bin/env python3 | |
| # coding: utf-8 | |
| """ | |
| Author : weaming | |
| Created Time : 2018-05-26 21:32:59 | |
| Prerequisite: | |
| python3 -m pip install cson arrow | |
| """ | |
| import json | |
| import os |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
| Commit type | Emoji |
|---|---|
| Initial commit | 🎉 :tada: |
| Version tag | 🔖 :bookmark: |
| New feature | ✨ :sparkles: |
| Bugfix | 🐛 :bug: |
| """ | |
| Two things are wrong with Django's default `SECRET_KEY` system: | |
| 1. It is not random but pseudo-random | |
| 2. It saves and displays the SECRET_KEY in `settings.py` | |
| This snippet | |
| 1. uses `SystemRandom()` instead to generate a random key | |
| 2. saves a local `secret.txt` |
| package main | |
| import ( | |
| "context" | |
| "flag" | |
| "fmt" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| "time" |
| import BaseHTTPServer | |
| from SimpleHTTPServer import SimpleHTTPRequestHandler | |
| import sys | |
| import base64 | |
| key = "" | |
| class AuthHandler(SimpleHTTPRequestHandler): | |
| ''' Main class to present webpages and authentication. ''' | |
| def do_HEAD(self): |