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
| ''' | |
| @withargs(1) | |
| def myfunc(x): | |
| code | |
| -- | |
| myfunc = withargs(1)(myfunc) | |
| ============= |
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
| api design talk | |
| https://www.youtube.com/watch?v=heh4OeB9A-c | |
| - key ideas | |
| - when in doubt, leave it out | |
| - don't make client do anything the module could do | |
| -- | |
| - why is api design important |
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
| for each in `ls llvm-* clang* opt*`; do ln -sv $PWD/$each $PWD/$each-3.8; done |
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
| spacemacs learning | |
| ctrlp -- spc p f | |
| nerdtree -- spc d t | |
| spc b b | |
| https://dannysu.com/2014/12/14/spacemacs/ |
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
| minx to minc | |
| ssa in decompilers -> http://espace.library.uq.edu.au/view/UQ:158682 |
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
| // bitfield definitions | |
| typedef union { | |
| struct { | |
| unsigned ADON :1; | |
| unsigned GO_nDONE :1; | |
| unsigned CHS :5; | |
| }; | |
| struct { | |
| unsigned :1; | |
| unsigned ADGO :1; |
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
| opt-3.7 -load ./Ubouch.so -mypass test.bc -o out.bc | |
| [+] Checking func | |
| > Uninitialized read of `x` ; %1 = load i32, i32* %x, align 4 | |
| ; ModuleID = 'test.bc' | |
| target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | |
| target triple = "x86_64-pc-linux-gnu" | |
| ; Function Attrs: nounwind uwtable | |
| define void @func() #0 { | |
| %x = alloca i32, align 4 |
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
| i'm trying to install llvm, documenting it here | |
| ubuntu 14.04 | |
| http://llvm.org/docs/GettingStarted.html | |
| http://clang.llvm.org/get_started.html | |
| http://llvm.org/docs/GettingStarted.html#requirements | |
| install svn, cmake | |
| cd where-you-want-llvm-to-live |
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
| void print_byte(char c) { | |
| if (c >= ' ' && c <= '~') { | |
| printf("%c", c); | |
| } else { | |
| printf("."); | |
| } | |
| } | |
| void print_ascii(size_t off, size_t len, const unsigned char *hex) { | |
| for (size_t i = 0; i < len; i++) { |
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
| #include <stdio.h> | |
| int main() { | |
| int x = 1; | |
| char *y = (char*) &x; | |
| if (*y == 1) { | |
| puts("little endian"); | |
| } else { | |
| puts("big endian"); | |
| } | |
| } |