Skip to content

Instantly share code, notes, and snippets.

sad, ttyS0 has been taken by other user


sad, ttyS0 has been taken by other user
View GitHub Profile
ttys3 / merge_git_repo_as_subdir
Created Jun 23, 2019 — forked from smdabdoub/merge_git_repo_as_subdir
Merge one git repository into another repository as a sub-directory
View merge_git_repo_as_subdir
# based on the following:
git clone repo_main
git clone repo_sub
cd repo_main
git remote add repo_sub ../repo_sub
git fetch repo_sub

Create Root CA (Done once)

Create Root Key

Attention: this is the key used to sign the certificate requests, anyone holding this can sign certificates on your behalf. So keep it in a safe place!

openssl genrsa -des3 -out rootCA.key 4096
ttys3 /
Created Jul 30, 2019 — forked from XVilka/
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
ttys3 /
Created Sep 3, 2019 — forked from garthk/
Fixing Docker on QNAP
$ export DOCKER_HOST=tcp://fnord.local:2376 DOCKER_TLS_VERIFY=1
$ docker ps
An error occurred trying to connect: Get https://fnord.local:2376/v1.21/containers/json: x509: certificate is valid for fnord, , localhost, not fnord.local
$ ssh admin@fnord.local
# /sbin/setcfg global realm local -f /etc/config/smb.conf
# /etc/init.d/ restart
# hostname -f
# cd $(dirname $(readlink /etc/init.d/
ttys3 / diskusage.go
Last active Jan 26, 2022 — forked from lunny/diskinfo.go
Disk Usage info like `df -h` for Golang
View diskusage.go
package main
import (
syscall ""
type DiskStatus struct {
All uint64 `json:"all"`
Used uint64 `json:"used"`
ttys3 / why phpbb has failed the open source
Last active Apr 1, 2021 — forked from damianb/gist:1515305
why phpbb has failed the open source movement
View why phpbb has failed the open source
ttys3 / authserver.go
Created Nov 23, 2019 — forked from elithrar/authserver.go
HTTP Basic Auth example in Go (based on + bespoke middleware implementation)
View authserver.go
package main
import (
func main() {
#!/usr/bin/env python2
# Find and replace tracker urls in a Deluge torrents.state
import os
import sys
import platform
import shutil
import cPickle
ttys3 /
Created Dec 3, 2019 — forked from ageis/
Options for hardening systemd service units

security and hardening options for systemd service units

A common and reliable pattern in service unit files is thus:

ttys3 / post-receive
Created Dec 6, 2019 — forked from lemiorhan/post-receive
Post-receive hook to deploy the code being pushed to production branch to a specific folder
View post-receive
while read oldrev newrev refname
branch=$(git rev-parse --symbolic --abbrev-ref $refname)
if [ -n "$branch" ] && [ "$target_branch" == "$branch" ]; then