Skip to content

Instantly share code, notes, and snippets.

View AaronLaw's full-sized avatar
🎯
Focusing

Aaron Law AaronLaw

🎯
Focusing
View GitHub Profile
@AaronLaw
AaronLaw / archlinux.md
Created October 4, 2024 02:26 — forked from tanyuan/archlinux.md
Arch Linux 為什麼這麼迷人?

Arch Linux 為什麼這麼迷人?

Arch Linux 是眾多 Linux 作業系統中的一種,對象是有 Linux 指令操作經驗的「進階使用者」,想要打造更適合自己的環境,例如不同的桌面、視窗環境等,體驗最新的套件。

Arch Linux 只有文字介面,不包含圖形介面。也就是說,當你安裝完 Arch Linux 之後,你會看到整個螢幕黑黑一片,電腦期待著你用鍵盤輸入文字指令。Arch Linux 只提供最基本可以讓電腦跑起來的功能,其他套件都要自己安裝。

成為掌握一切的設計師

Arch Linux 不會裝你不會用到的東西,你會自己親自打造完全屬於自己的電腦。不會有程式任意自動啟動,不會有人強迫你更新。你可以把你的電腦改成任何模樣,同樣你也為你的電腦的易用性和安全性負責。

@AaronLaw
AaronLaw / csv-statistics.md
Created October 4, 2024 02:25 — forked from tanyuan/csv-statistics.md
Useful CSV commands.

CSV Command Line Statistics

tree list a tree view of current directory recursively, better than ls.

Check line counts for all data:

    wc -l *.csv

Install Python toolkit csvkit for csv* commands.

@AaronLaw
AaronLaw / GitHub-Project-Creation-Flow.png
Created October 4, 2024 02:25 — forked from tanyuan/GitHub-Project-Creation-Flow.png
Useful git and GitHub commands.
GitHub-Project-Creation-Flow.png
@AaronLaw
AaronLaw / Installing Python 3.7 from source on Ubuntu 18.04.md
Created February 6, 2022 10:12
Installing Python 3.7 from source on Ubuntu 18.04

Installing Python 3.7 from source on Ubuntu 18.04

# update system
sudo apt update && sudo apt upgrade -y

# install build tools and python prerequisites
sudo apt install build-essential libssl-dev zlib1g-dev libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev tk-dev libffi-dev

# download and extract python
@AaronLaw
AaronLaw / 1_Server Setup
Created February 6, 2022 10:08
Server Setup
.
@AaronLaw
AaronLaw / snakecoin-server-full-code.py
Created June 3, 2021 20:51 — forked from aunyks/snakecoin-server-full-code.py
The code in this gist isn't as succinct as I'd like it to be. Please bare with me and ask plenty of questions that you may have about it.
from flask import Flask
from flask import request
import json
import requests
import hashlib as hasher
import datetime as date
node = Flask(__name__)
# Define what a Snakecoin block is
class Block:
@AaronLaw
AaronLaw / colours-old.py
Created November 15, 2020 04:31 — forked from sheljohn/colours-old.py
Print with colors in most shells (Python, standalone)
# Python 2, class
# Author: J.Hadida (jhadida87 at ggooglemail)
class ColorPrinter:
"""
Usage:
cprint = ColorPrinter()
cprint.cfg('c','m','bux').out('Hello','World!')
cprint.rst().out('Bye now...')
@AaronLaw
AaronLaw / backup.py
Created October 7, 2020 18:34 — forked from tompaton/backup.py
Python backup script
#!/usr/bin/env python
"""
backup.py
Create an archive which will be suitable for rsyncing to a remote backup.
- will not copy data unnecessarily for common operations such as
renaming a file or reorganising the directory structure.
(assumes large files are generally going to be immutable, e.g. audio/video)
- doesn't try to do anything fancy with permissions etc.
@AaronLaw
AaronLaw / csallseeingeye.py
Created March 19, 2020 23:45 — forked from wanghailei/csallseeingeye.py
Code snippets of All Seeing Eye
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2009 - 2014, Hailei Wang. All rights reserved.
from nodebox import geo
colors = ximport("colors")
# Define Brush
def composeimage( x, y, colr, radius, points, diminish ) :
nofill()
stroke()
@AaronLaw
AaronLaw / bbideolabs.py
Created March 19, 2020 23:44 — forked from wanghailei/bbideolabs.py
Code snippets of BB IDEO LABS
# The following code and the code generated art works are the intellectrual properities of Hailei Wang.
# © 2010 - 2014, Hailei Wang. All rights reserved.
colors = ximport( "colors" )
font( "Courier", 200 )
align( CENTER )
text_path_line_1 = textpath( "IDEO", 0, 200, width = WIDTH)
text_path_line_2 = textpath( "LABS", 0, 350, width = WIDTH)