Skip to content

Instantly share code, notes, and snippets.

View gangliao's full-sized avatar
🏠
Working from home

Gang Liao gangliao

🏠
Working from home
View GitHub Profile
@tsaarni
tsaarni / stack-backtrace.cpp
Last active August 20, 2023 23:33
How to print stack backtrace in gcc
/*
## Compile
g++ -Wall -std=c++11 -rdynamic -g stack-backtrace.cpp -lbacktrace -o stack-backtrace && ./stack-backtrace
clang++ -Wall -std=c++11 -rdynamic -g stack-backtrace.cpp -lbacktrace -o stack-backtrace && ./stack-backtrace
## Output
Backtrace:
@antiagainst
antiagainst / function-argument.cmake
Created December 28, 2014 16:00
ARGC, ARGV, ARGN, ARGVn in CMake
cmake_minimum_required(VERSION 2.8)
function(use_llvm TARGET)
message("ARGC=\"${ARGC}\"")
message("ARGN=\"${ARGN}\"")
message("ARGV=\"${ARGV}\"")
message("ARGV0=\"${ARGV0}\"")
message("ARGV1=\"${ARGV1}\"")
endfunction()
@SiegeLord
SiegeLord / output
Created June 11, 2014 15:54
Rust matrix expression templates
clone
Matrix { data: [100, 200, 300] }
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active September 28, 2025 09:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'