Skip to content

Instantly share code, notes, and snippets.

View tcmhoang's full-sized avatar
🤦‍♂️
Attempting to brew coffee using a teapot.

Conrad Hoang tcmhoang

🤦‍♂️
Attempting to brew coffee using a teapot.
View GitHub Profile
### Keybase proof
I hereby claim:
* I am tcmhoang on github.
* I am tcmhoang (https://keybase.io/tcmhoang) on keybase.
* I have a public key ASA6rEkaoSnZR__q40-J2xg5aBXs5guCib4MRlyqvQYv0go
To claim this, I am signing this object:
@tcmhoang
tcmhoang / main.dart
Last active August 19, 2023 11:50
SliverAppBar Demo
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) => MaterialApp(
home: MyHomePage(),
[Unit]
Description=bye
[Service]
Type=oneshot
ExecStart=/usr/local/bin/foobaz
UMask=0077
DynamicUser=yes
PrivateTmp=yes
PrivateDevices=yes
@tcmhoang
tcmhoang / fusuma kde
Last active February 26, 2022 15:03
Update key mapping
swipe:
3:
left:
command: 'xdotool key alt+Right' # History forward
right:
command: 'xdotool key alt+Left' # History back
up:
command: 'xdotool key Control_L+t' # Open new tab
keypress:
LEFTSHIFT:
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'
alias please='sudo $(fc -ln -1)'
alias pls='sudo'
alias finder='pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY KDE_SESSION_VERSION=5 KDE_FULL_SESSION=true dolphin'
# alias to show the date
alias da='date "+%Y-%m-%d %A %T %Z"'
# Replace the "❯" symbol in the prompt with "➜"
[character]
# The name of the module we are configuring is "character"
success_symbol = "[➜](bold green)"
# The "symbol" segment is being set to "➜"
error_symbol = "[✗](bold red)"
vicmd_symbol = "[V](bold green) "
# Disable the package module, hiding it from the prompt completely
def loadHTMLCode():
print('Loading codes form HTML files')
res = []
with open("input.txt",'r') as inFile:
for line in inFile:
s = line.strip();
words = s.split("\\")
tmp = "\\\\".join(words)
tmpWords = tmp.split('"')
res.append('\\"'.join(tmpWords))
@tcmhoang
tcmhoang / dhclient.conf
Created June 13, 2020 05:43
DNS config in linux (systemd)
#/etc/dhcp/dhclient.conf
supersede domain-name-servers 1.0.0.1;
prepend domain-name-servers 1.1.1.1;
@tcmhoang
tcmhoang / config
Created April 24, 2020 03:07
Basic config for privoxy with tor
forward-socks5 / 127.0.0.1:9050 .
forward-socks5t / 127.0.0.1:9050 .
forward-socks4 / 127.0.0.1:9050 .
forward-socks4a / 127.0.0.1:9050 .
forward 192.168.*.*/ .
forward 10.*.*.*/ .
forward 127.*.*.*/ .
forward localhost/ .
@tcmhoang
tcmhoang / blur.ds
Created April 20, 2020 02:08
Devilspie Config
( if
(or
( contains ( window_class ) "Firefox" )
(contains ( window_class ) "Popcorn-Time"))
(begin
(spawn_async (str "xprop -id " (window_xid) " -f _KDE_NET_WM_BLUR_BEHIND_REGION 32c -set _KDE_NET_WM_BLUR_BEHIND_REGION 0 "))