Skip to content

Instantly share code, notes, and snippets.

View etosch's full-sized avatar

Emma "Frank" Tosch etosch

View GitHub Profile
@etosch
etosch / crash report
Created March 24, 2013 23:08
This makes me a l33t h4x0r, right?
0 clang 0x0000000100c539f2 main + 12919346
Stack dump:
0. Program arguments: /usr/bin/clang -cc1 -triple x86_64-apple-macosx10.8.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name Parser.cpp -pic-level 2 -mdisable-fp-elim -masm-verbos\
e -munwind-tables -target-cpu core2 -target-linker-version 136 -g -coverage-file /Users/etosch/dev/memstashed/parser.o -resource-dir /usr/bin/../lib/clang/4.2 -I . -fmodule-cache-path /var/folders/wp/rsvsklwn1l\
73jm32n3_lqqb00000gr/T/clang-module-cache -Wno-write-strings -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /Users/etosch/dev/memstashed -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackreal\
ign -fblocks -fobjc-runtime=macosx-10.8.0 -fobjc-dispatch-method=mixed -fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions -fdiagnostics-show-option -o parser.o -x c++ Parser.cpp
1. <eof> parser at end of file
2. Per-file LLVM IR generation
3. Parser.cpp:53:10: Generating code for declaration '<anonym
@etosch
etosch / server.cc
Created March 9, 2013 01:17
Sample code for how to use simplesocket.cc
#include "simplesocket.h"
#include <sstream>
int main(int argc, char * argv[]){
// continually transmit something here
int port;
stringstream(argv[1]) >> port;
serversocket * s = new serversocket(port, -1, true);
char buffer[256];
while (!strcmp(buffer,"")) {
@etosch
etosch / socktest.cc
Created March 9, 2013 01:11
Sample code for how to use simplesocket.cc
#include "simplesocket.h"
int main(int argc, char * argv[]){
int port;
stringstream(argv[1]) >> port;
clientsocket * s = new clientsocket("localhost", port);
printf("3:%d\n", s->connect());
s->write("asdf", 256);
s->close();
}