Skip to content

Instantly share code, notes, and snippets.


Lee Tang D0zingcat

View GitHub Profile
D0zingcat /
Last active Dec 18, 2020
download rclone and replace binary program with latest rclone
#!/usr/bin/env bash
set -x
curl -L -o $rclone_zip
unzip -o $rclone_zip
dir_name=`ls -F | grep -e 'rclone.*/'`
version=`echo $dir_name | cut -d"-" -f2`
echo $dir_name, $version
cp "$dir_name"/rclone /usr/local/bin/$name_with_version
D0zingcat / linux calendar
Created Jan 31, 2018
A simple unix calendar implementation in python
View linux calendar
# -*- coding: utf-8 -*-
Spyder Editor
This is a temporary script file.
import os
def print_months(year, month):
if year < 1900:
View 2017.12.02 | dailylabs - Cloud9 | Docker + Nginx + LetsEncrypt — » Miroslav Shubernetskiy | jwilder/nginx-proxy: Automated nginx proxy for Docker containers using docker-gen | clarkzjw/nginx-proxy-google: Docker image of Nginx reverse proxy for Google | docker - Dockerized nginx is not starting - Stack Overflow | Set up an SSH key - Atlassian Documentation | Docker Hub | 5 Linux Desktop Environments on the Rise for 2017 | | The source for Linux information | 13 B
View markdown
  1. Anchor at current page Github automatically parses anchor tags out of your headers. So you can do the following:
### Foo

In the above case, the Foo header has generated an anchor tag with the name foo

Note: just one # for all heading sizes, no space between # and anchor name, anchor tag names must be lowercase, and delimited by dashes if multi-word. Just like this:

View swiss-army

Text processing

Name Usage
Pandoc Convert one markup format to another


Name Usage
Launchpad A software collaboration platform that engages developer developing softwares on Ubuntu
View git
commands scope common user cases
git reset Commit Discard commits in a private branch or throw away uncommited changes
git reset File Unstage a file
git checkot Commit switch between branches or inspect old snapshot
git checkout File Discard changes in the working directory
git revert commit Undo commits in a public branch
git revert File 不支持
git push -u origin master persistence on next push, "origin master" can be ommitted.
View linux

Without other narrates, this note is only intended for Debian or Ubuntu.

command function usage
update-alternatives multi-version runnable program preference management
test -x ${file} test if ${file} exists and granted with executable permission
if [ -f ${file} ] test if this file is a regular file
set -e cause the shell to exit if any subcommand or pipeline returns a non-zero status
View mess

Docker notes

  1. docker Network differenece between EXPOSE and PUBLISH: Exposing ports is a way of documenting which ports are used, but does not actually map or open any ports. Exposing ports is optional.

Best practives in [?]nix

command line proxy: proxychains

View java





View 20170913 | compile nginx - Google Search | How to Install NGINX Open Source | NGINX | How To Configure Nginx as a Web Server and Reverse Proxy for Apache on One Ubuntu 16.04 Server | DigitalOcean | How To Set Up Nginx Server Blocks (Virtual Hosts) on Ubuntu 16.04 | DigitalOcean | How To Install Nginx on Ubuntu 16.04 | DigitalOcean