This file contains 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/sh -x | |
rm -f *.o weak | |
CC=clang-9 | |
LD=$CC | |
CFLAGS="-fno-inline-functions -O0" | |
$CC -c weak.c -o weak.o $CFLAGS | |
$CC -c weak_b.c -o weak_b.o $CFLAGS |
This file contains 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/sh -x | |
CC=clang-9 | |
rm -f *.o wrap nowrap | |
# build without wrapping | |
$CC -c wrap.c -o wrap.o | |
$CC -c wrap_b.c -o wrap_b.o | |
$CC wrap.o wrap_b.o -o nowrap |
This file contains 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
/* ftg_core.h - v0.5 - Frogtoss Toolbox. Public domain-like license below. | |
ftg libraries are copyright (C) 2015 Frogtoss Games, Inc. | |
http://github.com/mlabbe/ftg_toolbox | |
ftg header files are single file header files intended to be useful | |
in C/C++. ftg_core contains generally useful functions | |
Special thanks to STB for the inspiration. |
This file contains 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
dev = true | |
ent_list = {} | |
types = {} | |
cam={0,0} -- world top-left | |
-- | |
-- helpers | |
-- | |
function get_player(n) |
This file contains 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 | |
# | |
# Roaming security group by Michael Labbe | |
# @frogtoss | |
# | |
# security group id | |
GROUP_ID="sg-xxx" |
This file contains 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
(use-package cc-mode | |
:defer t | |
:init | |
(add-hook 'before-save-hook #'clang-format-buffer-smart) | |
:config | |
(progn | |
(defun clang-format-buffer-smart() | |
"Reformat buffer only if .clang-format exists in the projectile root." | |
(when (file-exists-p (expand-file-name ".clang-format" (projectile-project-root))) | |
(clang-format-buffer))) |
This file contains 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
/* | |
simple rust calculator | |
add_op := '+' | '-' | |
mul_op := '*' | '/' | |
digits := {'+' | '-'} [0..9] {[0..9]} | |
expr := term {add_op term} | |
term := factor {mul_op factor} | |
factor := digits | '(' expr ')' |
This file contains 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
typedef union { | |
struct tuple_s { char a; short b; long long c; }tuple; | |
uint64_t _all[sizeof(struct tuple_s)/sizeof(uint64_t)]; | |
}zero_tuple_u; | |
int main() { | |
zero_tuple_u t = {._all = {0}}; | |
} |
This file contains 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
export INSTALLDIR=$HOME/dev/node/local # or wherever | |
mkdir -p $INSTALLDIR | |
# Put these lines in your .bashrc | |
export PATH=$INSTALLDIR/bin:$PATH | |
export MANPATH=$INSTALLDIR/share/man | |
git clone https://github.com/nodejs/node | |
cd node |
This file contains 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
/* | |
simple calculator implemented via recursive descent | |
add_op := + | - | |
mul_op := * | / | |
digits := {+|-} [0..9] {[0..9]} | |
expr := term {add_op term} | |
term := factor {mul_op factor} |