Skip to content

Instantly share code, notes, and snippets.

suntong

Block or report user

Report or block suntong

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fsck.txt
% fsck -vacck $os_dev
fsck from util-linux 2.31.1
kdt-os: Updating bad block inode.
102459 inodes used (32.02%, out of 320000)
4437 non-contiguous files (4.3%)
29 non-contiguous directories (0.0%)
# of inodes with ind/dind/tind blocks: 4249/39/0
594997 blocks used (46.48%, out of 1280000)
0 bad blocks
View dbab-new.md

Configure dbab

The dbab best works with a second static IP address. To configure dbab (and to work with a local web server):

  1. Stop dbab-svr service
  2. Change the IP address that dbab uses to the second IP address
  3. Start dbab-svr service
  4. Start your local web server again if you have any. You may need to limit its listening port from 0.0.0.0 to your first static IP as well if necessary.

In details, do the following as root, again assuming that the server's own IP address is 192.168.0.101, and its second IP is 192.168.0.100.

@suntong
suntong / git-prompt-color.sh
Last active Jul 17, 2019 — forked from goldie-lin/git-bash.awk
git-prompt.sh re-implemented with gawk. >100x faster under git-win (requires git version >= 2.11.0)
View git-prompt-color.sh
#!/usr/bin/env bash
git rev-parse 2>/dev/null && \
git status --porcelain=v2 -b --ignored | gawk '
/^# branch\.head / { head = $0; sub(/# branch\.head /, "", head); next; }
/^# branch\.ab / { match($0, /^# branch\.ab \+([0-9]+) -([0-9]+)$/, ab); ahead = ab[1]; behind = ab[2]; next; }
/^! / { next; } /* ignored */
/^[12] [^.]. / { staged++; next; }
/^[12] \.[MD] / { changed++; next; }
View lubPkgs.new
2048-qt
accountsservice
adduser
adwaita-icon-theme
alsa-base
alsa-utils
apt
apt-utils
arc-theme
ark
View mate-lub.diff
--- /var/sys/info/PkgsUbuntu.new 2018-04-29 09:51:56.185603357 -0400
+++ PkgsUbuntu.new 2019-06-23 19:43:07.185802054 -0400
@@ -1 +1,2 @@
+2048-qt
accountsservice
@@ -7,3 +8,4 @@
apt-utils
-bamfdaemon
+arc-theme
+ark
View Images-geany-themes.tmpl
{{range .Images}}{{$img:=.}}{{/* theme name */}}{{$tn:=$img | basename}}{{/* theme title */}}{{$tt:=(printf "The %s Theme" $tn | clk2uc)}}
### [{{$tt}}](../colorschemes/{{$tn}}.conf)
[![{{$img}}]({{$img}})]({{$img}} "{{$tt}}")
[{{$tt}} Direct Download](https://raw.githubusercontent.com/geany/geany-themes/master/colorschemes/{{$tn}}.conf)
{{end}}
@suntong
suntong / http.go
Created Jun 7, 2019 — forked from AngerM/http.go
High Performance Golang HTTP Client
View http.go
package utils
import (
"context"
"io"
"io/ioutil"
"net"
"net/http"
"strings"
"time"
View foo.go
////////////////////////////////////////////////////////////////////////////
// Program: dbab-svr
// Purpose: Pixel Server in Go
// Authors: Tong Sun (c) 2019, All rights reserved
////////////////////////////////////////////////////////////////////////////
package main
import (
"bufio"
You can’t perform that action at this time.