Skip to content

Instantly share code, notes, and snippets.

Avatar

F.J Kong BH1SCW

View GitHub Profile
@BH1SCW
BH1SCW / ctags_with_dep.sh
Created Sep 6, 2021 — forked from xuhdev/ctags_with_dep.sh
Generate ctags file for C or C++ files and its depedencies (included header files). This could avoid you to always generate a huge tags file.
View ctags_with_dep.sh
#!/bin/sh
# https://www.topbug.net/blog/2012/03/17/generate-ctags-files-for-c-slash-c-plus-plus-source-files-and-all-of-their-included-header-files/
# ./ctags_with_dep.sh file1.c file2.c ... to generate a tags file for these files.
gcc -M "$@" | sed -e 's/[\\ ]/\n/g' | \
sed -e '/^$/d' -e '/\.o:[ \t]*$/d' | \
ctags -L - --c++-kinds=+p --fields=+iaS --extra=+q
@BH1SCW
BH1SCW / things-to-fantastical.applescript
Created Sep 2, 2021 — forked from IskenHuang/things-to-fantastical.applescript
Things3 complete todos create calendar event to fantastical.
View things-to-fantastical.applescript
(*
## Goal
This script is make new calendar event to fantastical2 from things3 complete todos in 'Logbook' on specified date.
## How to use:
* Default is today
* `$ osascript things-to-fantastical.applescript`
* The specified date
* `$ osascript things-to-fantastical.applescript 2017/08/12`
*)
@BH1SCW
BH1SCW / mosh-agent-forwarding-ng.rb
Created Aug 21, 2021 — forked from snixon/mosh-agent-forwarding-ng.rb
Homebrew Formula: mosh with agent forwarding
View mosh-agent-forwarding-ng.rb
require "formula"
class MobileShell < Formula
desc "Remote terminal application"
homepage "https://mosh.mit.edu/"
url "https://mosh.mit.edu/mosh-1.2.5.tar.gz"
sha256 "1af809e5d747c333a852fbf7acdbf4d354dc4bbc2839e3afe5cf798190074be3"
bottle do
sha256 "046b0c48cd1c573d57500e683122e3152a00556ad960938c6caa962b0c2ef460" => :el_capitan
@BH1SCW
BH1SCW / patch-edid.md
Created Aug 10, 2021 — forked from ejdyksen/patch-edid.md
A script to fix EDID problems on external monitors in macOS
View patch-edid.md

patch-edid.rb

A script to fix EDID problems on external monitors in macOS.

Instructions

  1. Connect only the problem display.

  2. Create this directory structure (if it doesn't already exist):

View Shadowsocks与git代理配置.md

Git-Shadowsocks与git代理配置

# 设置配置

# Windows默认1080端口
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
@BH1SCW
BH1SCW / install-gnu-sed-on-mac-osx.sh
Created Feb 20, 2020 — forked from jlrigau/install-gnu-sed-on-mac-osx.sh
How to install Gnu sed on Mac OS X
View install-gnu-sed-on-mac-osx.sh
brew install --with-default-names gnu-sed
View Git常用备忘.md

Git常用备忘.md

引自:http://blogread.cn/it/article/6282?f=sa

配置

git config --global user.name "robbin"  
git config --global user.email "fankai@gmail.com"
git config --global color.ui true
@BH1SCW
BH1SCW / mutt-grep
Created May 17, 2012 — forked from s5unty/mutt-grep
wrapper around [mu|recoll], the [mail|file] indexing/searching utility
View mutt-grep
#! /bin/sh -
# inspiration from: http://www.zsh.org/mla/users/2007/msg01187.html
# require a POSIX sh, on those systems where the POSIX sh is not in /bin
# (like Solaris), you may need to adapt the shebang line above
# (/usr/xpg4/bin/sh on Solaris). You also need a terminfo aware "tput",
# ncurses one (the default on most systems) will do.
# wrapper around mu, the mail indexing/searching utility for mutt.
# in your ~/.muttrc:
View shift
#!/bin/bash
until [ $# -eq 0 ]
do
echo "第一个参数为: $1 参数个数为: $#"
shift
done
#!/bin/bash
if [ $# -eq 0 ]