Skip to content

Instantly share code, notes, and snippets.

View truebit's full-sized avatar
🎯
Focusing

Xiao Wang truebit

🎯
Focusing
View GitHub Profile
@truebit
truebit / init.lua
Last active March 22, 2024 08:25
Kitty Terminal: pull down from top like iTerm2
local spaces = require("hs.spaces") -- https://github.com/asmagill/hs._asm.spaces
-- Switch kitty
hs.hotkey.bind({'command'}, 'escape', function () -- change your own hotkey combo here, available keys could be found here:https://www.hammerspoon.org/docs/hs.hotkey.html#bind
local BUNDLE_ID = 'net.kovidgoyal.kitty' -- more accurate to avoid mismatching on browser titles
function getMainWindow(app)
-- get main window from app
local win = nil
while win == nil do
@truebit
truebit / alacritty.yml
Last active March 28, 2024 06:58 — forked from programus/alacritty.yml
pull down from top alacritty (like iTerm2)
window:
# Window dimensions (changes require restart)
#
# Number of lines/columns (not pixels) in the terminal. The number of columns
# must be at least `2`, while using a value of `0` for columns and lines will
# fall back to the window manager's recommended size.
dimensions:
columns: 500
lines: 30
@truebit
truebit / default.conf
Created April 2, 2019 01:53 — forked from mattes/default.conf
redash.io setup
upstream redash {
server redash:5000;
}
server {
listen 80;
location / {
return 301 https://$host$request_uri;
}
@truebit
truebit / iterm2-solarized.md
Created November 16, 2017 08:01 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Meslo powerline font + [Powerlevel9k] - (macOS)

Default

Default

Powerlevel9k

Powerlevel9k

<?php
namespace Pokus;
class Exception extends \Exception
{
}
function tttt($string)
{
try {
@truebit
truebit / valgrind_android_build.sh
Last active December 12, 2018 10:06
Valgrind 3.12.0 cross compile on Android
#!/bin/sh
#ndk root now could be installed in Android SDK manager/Extras/NDK Bundle; should be $ANDROID_HOME/ndk_bundle
echo "NKDROOT: " $NDKROOT
export ANRDOID_TOOLCHAIN="arm-linux-androideabi-4.9"
# Set up toolchain paths.
#
# For ARM
@truebit
truebit / libev-centos6.md
Last active October 5, 2021 07:55
install shadowsocks-libev on CentOS 6

shadowsocks-libev install on CentOS 6

Latest update:

2016/12/10 add prce dependency

2016/07/13 remove latest dependencies that is not needed for compile: asciidoc xmlto

2019/03/06 change shadowsocks resource; add shadowsocks new dependencies build

#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment
@truebit
truebit / clothes_lining
Last active December 16, 2015 22:30
面料材质中英对照
毛WOOL
丝 SILK(SE)
棉 COTTON(CO)
麻 LINEN
亚麻 FLAX
琼麻 SISAL
大麻 hemp
黄麻 jute
马尼拉麻 abaca
尼龙 NYLON