This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install qt | |
| brew linkapps qt | |
| brew cask install qt-creator | |
| launchctl setenv QTDIR /usr/local/Cellar/qt/4.8.7_2 (your env) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # turn on auto-indent | |
| set autoindent | |
| # syntax highlighting for C and C++ | |
| syntax "C" ".*(h|c)(xx|pp)?|cc" | |
| # first color the whole include line magenta... | |
| color brightmagenta "^\s*#include\s*["<].*[">]" | |
| # then make the include (or any other preprocessor directive) itself blue | |
| color brightblue "^\s*#((include\s*)|((define\b|ifdef\b|else\b|endif\b|ifndef\b|if\b|else\b|elif\b|line\b|error\b|pragma\b|undef\b).*))" | |
| # types and type qualifiers are green |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; debugging - ensure that message-show-backtrace's arg count matches that of the function to trace | |
| (defun message-show-backtrace () | |
| (message "%s-->%s" "MESSAGE HERE" (or (backtrace-frame 10) | |
| "NO BACKTRACE"))) | |
| ;; set name of function to trace - e.g. 'ztl-modification-state-change | |
| (setq traced-function 'ztl-modification-state-change) | |
| ;;;; eval to enable | |
| ;;(advice-add traced-function' :before #'message-show-backtrace) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # install_global.sh | |
| echo "install_global.sh ...." | |
| echo "install package for GNU global..." | |
| sudo apt-get update | |
| sudo apt-get -y install curl | |
| sudo apt-get -y install wget | |
| sudo apt-get -y install ncurses-dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| brew install pwgen | |
| genpasswd() { | |
| pwgen -Bsy $1 1 | pbcopy | |
| _tmp=`pbpaste` | |
| echo $_tmp | |
| echo "Has been copied to clipboard" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def callee do | |
| try do | |
| raise("fake") | |
| rescue | |
| e in RuntimeError -> | |
| [_, {m, f, a, _} | _] = :erlang.get_stacktrace() | |
| :io.format("I am ~p:~p/~p!~n",[m, f, a]) | |
| {m, f, a} | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-get install build-essential -y | |
| sudo apt-get install curl -y | |
| sudo apt-get install wget -y | |
| sudo apt-get install ncurses-dev -y | |
| sudo apt-get install llvm -y | |
| sudo apt-get install clang -y | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example program | |
| #include <iostream> | |
| #include <string> | |
| int main() | |
| { | |
| for(int i=0; i<8; ++i) { | |
| float x = 1.0f * (i&4 ? .5f : -.5f); | |
| float y = 1.0f * (i&2 ? .5f : -.5f); | |
| float z = 1.0f * (i&1 ? .5f : -.5f); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Example program | |
| #include <iostream> | |
| #include <string> | |
| #include <cmath> | |
| struct Vec3; | |
| Vec3 operator*(float r, const Vec3& v); | |
| struct Vec3 { |