Skip to content

Instantly share code, notes, and snippets.

View chfanghr's full-sized avatar
🏃‍♂️
Running away from the POOH

方泓睿 chfanghr

🏃‍♂️
Running away from the POOH
View GitHub Profile
@yamaya
yamaya / xcode-clang-vers
Last active April 2, 2025 00:16
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
@nelstrom
nelstrom / access-control-lists-on-osx.md
Last active January 17, 2025 23:25
Setting ACL on OS X

I have two user accounts set up on my mac. User drew I use for most things, but if I'm making a screencast I'll switch to the demo user. I know that the demo user has a clean desktop, and the font size is larger than usual in my terminal and text editors, making everything a bit more legible when capturing the screen. When I record a screencast as the demo user, I save the file to /Users/Shared/screencasts. As I understand it, the /Users/Shared directory is supposed to be accessible to all user accounts on the mac. If I created and saved a screenflow document as the demo user, I should be able to read and write that file when logged in as user drew.

That was the theory, but it didn't always work out that well in practice. I would occasionally find that a directory was only writable by one user or the other. Perhaps I'd open a screenflow document as user drew and attempt to export the video to the same directory, only to find that the directory was owned by demo, meaning that I couldn't cr

@steeve
steeve / _readme.md
Last active March 25, 2025 07:32
How to cross compile Go with CGO programs for a different OS/Arch

How to cross compile Go with CGO programs for a different OS/Arch

It is possible to compile Go programs for a different OS, even though go build says otherwise.

You'll need:

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active April 21, 2025 14:57
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@srigi
srigi / gist:f81ce80d5c5c8f815e40
Created June 7, 2014 19:15
cloc statistics by commit
# !/bin/bash
startCommit=$2
initialCommit=`git rev-parse HEAD` # commit of the repository before we start the work
file='cloc-stats.csv'
# use sed to remove duplicate lines with commit ID, git-rev-list not fully accepting my format, arrrgh
if [[ $1 = "--help" || $1 = "-h" ]]; then
echo "Generate 'cloc per commit' stats from a GIT repository by following the parent links from the given commit."
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/zscott/.rubies/ruby-trunk/bin/ruby extconf.rb
checking for sqlite3.h... yes
checking for sqlite3_libversion_number() in -lsqlite3... yes
checking for rb_proc_arity()... yes
checking for sqlite3_initialize()... yes
checking for sqlite3_backup_init()... yes
checking for sqlite3_column_database_name()... no
checking for sqlite3_enable_load_extension()... no
@dgibbs64
dgibbs64 / SteamCMDCommmandsandCionvars
Created May 9, 2015 09:51
SteamCMD Commands and Convars
Convars:
app_info_http_min = "0" :
app_info_http_num_sockets = "8" :
AsyncFileIODisableWrite = "0" :
AsyncFileIOExpectOutstandingIO = "16" :
AsyncFileIOForceGenericIO = "0" :
AsyncFileIOMaxPending = "128" :
AsyncFileIOReadHandleCache = "32" :
AsyncFileIOWriteHandleCache = "128" :
batterypercent = "0" :
// Base code taken from
// https://github.com/mfontanini/Programs-Scripts/blob/master/constexpr_hashes/md5.h
// and expanded to include a main function
#ifndef CONSTEXPR_HASH_MD5_H
#define CONSTEXPR_HASH_MD5_H
#include <array>
#include <iostream>
#include <cstdint>
@jeb2239
jeb2239 / main.cpp
Created February 28, 2017 22:09
Example C++ concepts with gcc 6.2 or greater
//compile this file with gcc 6.2 or greater
#include <iostream>
#include <string>
#include <locale>
#include <vector>
#include <cassert>
#include <list>
using namespace std::literals;
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active April 5, 2025 15:33
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages