Skip to content

Instantly share code, notes, and snippets.

View jwu's full-sized avatar
🖖
wuhu......

Johnny Wu jwu

🖖
wuhu......
  • @xmfunny
  • Xia Men,Fu Jian,China
View GitHub Profile
@jwu
jwu / cloudSettings
Last active July 15, 2020 02:28
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-06-30T03:23:00.524Z","extensionVersion":"v3.4.3"}
@jwu
jwu / orthodoxc++.md
Created March 8, 2016 07:59 — forked from bkaradzic/orthodoxc++.md
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@jwu
jwu / git-bash.sh
Created March 28, 2014 04:15
Git bash helper
# check if our commits is ahead of origin
result=$(git cherry -v)
if [ ! "${result}" == "" ]; then
echo "You have commits ahead of origin, try git push."
fi
# check if we have uncommit changes
if ! git diff-index --quiet HEAD --; then
echo "You have uncommit changes."
echo "Note: this command will not detect unstaged new files"
@jwu
jwu / 0_reuse_code.js
Created March 28, 2014 03:56
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@jwu
jwu / keycode.js
Created March 28, 2014 03:33
The keycode for javascript
var enums = {};
enums.keyboard = {
BACKSPACE: 8,
TAB: 9,
ENTER: 13,
SHIFT: 16,
CTRL: 17,
ALT: 18,
PAUSE: 19,
CAPS_LOCK: 20,
@jwu
jwu / setjmp_example.c
Last active August 21, 2017 05:58
a setjmp/longjmp example
#include <stdio.h>
#include <setjmp.h>
jmp_buf test1;
void tryjump () {
longjmp(test1, 3);
}
int main (void) {