{
"Version":"2012-10-17",
"Statement":[
{
"Sid":"seems-it-doesnt-matter-much-except-the-uniqueness",
"Effect":"Allow",
"Action":[
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const enum Gender { | |
Male = "Male", | |
Female = "Female", | |
} | |
interface Order { | |
id: string; | |
date: Date; | |
totalPrice: number; | |
customer: { |
-
Install
sudo apt update sudo apt upgrade -y sudo apt install wireguard
-
Configure Server
-
Install
sudo apt update sudo apt install shadowsocks-libev
-
Configure
sudo vim /etc/shadowsocks-libev/config.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return ;; | |
esac |
- If an instance of
B
should be used anywhere an instance ofA
, the use inheritance. If an instance ofB
should use an instance ofA
, use composition/delegation. - Use composition/delegation, unless you want substitutability.
- Be unemotional about designing your software.
- It is almost impossible to get it right the first time.
- Defer decisions that are possible to be deferred.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# paste following lines into /etc/apt/sources.list.d/deadsnakes-ppa-bionic.list | |
deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic main | |
deb-src http://ppa.launchpad.net/deadsnakes/ppa/ubuntu bionic main |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.7 | |
import subprocess | |
import re | |
from collections import defaultdict | |
stagedFiles = subprocess.run(["git", "diff", "--cached", "--name-only", "--diff-filter=ACM"], capture_output=True, text=True).stdout.strip().split("\n") | |
def sortLines(lines): | |
d = defaultdict(list) | |
zipped = [(x[6:x.index(".")], x) for x in lines] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required (VERSION 3.10) | |
project (main) | |
# book.cpp implementing book.h definitions | |
add_library(Book book.h book.cpp) | |
add_executable(main main.cpp) | |
# linking Book library to main | |
target_link_libraries (main Book) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
env: | |
browser: true | |
commonjs: true | |
es6: true | |
node: true | |
extends: | |
- eslint:recommended | |
- airbnb | |
- plugin:react/recommended | |
- plugin:import/errors |