Skip to content

Instantly share code, notes, and snippets.

View mpenick's full-sized avatar
🍵

Michael Penick mpenick

🍵
View GitHub Profile
; Generated with: gcc-4.4 -O0 -S -Iinclude -Isrc/unix -Isrc src/unix/async.c
.file "async.c"
.text
.type uv__req_init, @function
uv__req_init:
.LFB2:
.cfi_startproc
pushq %rbp
.cfi_def_cfa_offset 16
/*
Copyright (c) 2014-2015 DataStax
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
(lldb) bt
* thread #1: tid = 0x79aa8c, 0x00007fff8ee3090a libc++abi.dylib`__cxxabiv1::__pointer_type_info::can_catch(__cxxabiv1::__shim_type_info const*, void*&) const + 24, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1019fc000)
* frame #0: 0x00007fff8ee3090a libc++abi.dylib`__cxxabiv1::__pointer_type_info::can_catch(__cxxabiv1::__shim_type_info const*, void*&) const + 24
frame #1: 0x00007fff8ee2f79c libc++abi.dylib`__cxxabiv1::scan_eh_tab(__cxxabiv1::(anonymous namespace)::scan_results&, _Unwind_Action, bool, _Unwind_Exception*, _Unwind_Context*) + 826
frame #2: 0x00007fff8ee2f382 libc++abi.dylib`__gxx_personality_v0 + 102
frame #3: 0x00007fff95365951 libunwind.dylib`_Unwind_RaiseException + 153
frame #4: 0x00007fff8ee2eb1f libc++abi.dylib`__cxa_throw + 104
frame #5: 0x0000000100c0814c libboost_unit_test_framework-mt.dylib`boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_result const&, boost::unit_test::lazy_ostream const&, boost
#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <unistd.h>
#include <algorithm>
#include <boost/atomic.hpp>
#include <uv.h>
Easy:
XX string_ref - Internal impl
XX starts_with, ends_with - Internal impl
XX case insensitive compare - Internal impl
XX function, bind - Internal impl - Function pointers
Medium:
XX hash_range - https://code.google.com/p/sparsehash/
XX is_base_and_derived - Internal impl
XX stdint
#include <stdio.h>
#include <stdint.h>
#include <math.h>
#include <unistd.h>
#include <sys/time.h>
#include <algorithm>
#include <boost/atomic.hpp>
28 #include <stdio.h>
29 #include <cassandra.h>
30
31 int main() {
32 CassFuture* close_future = NULL;
33
34 /* Setup and connect to cluster */
35 CassCluster* cluster = cass_cluster_new();
36 CassSession* session = cass_session_new();
37
#include <stdlib.h>
/* Stubs to make this compile */
typedef struct CassCluster_ {
} CassCluster;
typedef enum CassError_ {
CASS_OK = 0
} CassError;
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the