Skip to content

Instantly share code, notes, and snippets.

Julien Ammous schmurfy

Block or report user

Report or block schmurfy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@schmurfy
schmurfy / client.c
Created Sep 25, 2018
mongoose_chunked
View client.c
#include "mongoose.h"
static int s_exit_flag = 0;
static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
struct http_message *hm = (struct http_message *) ev_data;
switch (ev) {
case MG_EV_CONNECT:
if (*(int *) ev_data != 0) {
View chunked_client.c
#include "mongoose.h"
// gcc -o test -I mongoose/ mongoose/mongoose.c test.c
static int s_exit_flag = 0;
static void ev_handler(struct mg_connection *nc, int ev, void *ev_data) {
struct http_message *hm = (struct http_message *) ev_data;
switch (ev) {
View msgpack2.cs
using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MessagePack;
using MessagePack.Formatters;
using MessagePack.Resolvers;
namespace X2Tests
@schmurfy
schmurfy / msgpack.cs
Created Jul 31, 2017
Messgapack issue
View msgpack.cs
using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MessagePack;
using MessagePack.Formatters;
using MessagePack.Resolvers;
namespace X2Tests
View rbx_compile_error_3_8
Checking clang: found
Checking clang++: found
Checking for 'llvm-config': found! (version 3.8.1 - api: 308)
Checking sizeof(short): 2 bytes
Checking sizeof(int): 4 bytes
Checking sizeof(void*): 8 bytes
Checking sizeof(size_t): 8 bytes
Checking sizeof(long): 8 bytes
Checking sizeof(long long): 8 bytes
View rbx_compile_error
** Invoke gems:melbourne (first_time)
** Execute gems:melbourne
/Users/Schmurfy/Dev/personal/forks/rubinius/rubinius/staging/bin/rbx ./extconf.rbc
make && make install
** Invoke gems:extensions (first_time)
** Execute gems:extensions
/Users/Schmurfy/Dev/personal/forks/rubinius/rubinius/staging/bin/rbx extconf.rb
main # Rubinius::Loader at core/loader.rb:855
rubygems # Rubinius::Loader at core/loader.rb:603
load_rubygems . Rubinius::CodeLoader at core/code_loader.rb:561
@schmurfy
schmurfy / influxdb_cmdline.json
Last active Nov 25, 2016
influxb_issue_regex
View influxdb_cmdline.json
{
"results": [
{
"series": [
{
"name": "alerts",
"tags": {
"app_name": "mountpoints",
"host": "myhost",
"id": "",
View error
* thread #1: tid = 0x55bf9, 0x0000000100015e48 mruby`mrb_realloc_simple(mrb=0x746e65746e6f0006, p=0x0000000000000000, len=96) + 24 at gc.c:201, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_I386_GPFLT)
frame #0: 0x0000000100015e48 mruby`mrb_realloc_simple(mrb=0x746e65746e6f0006, p=0x0000000000000000, len=96) + 24 at gc.c:201
198 {
199 void *p2;
200
-> 201 p2 = (mrb->allocf)(mrb, p, len, mrb->allocf_ud);
202 if (!p2 && len > 0 && mrb->gc.heaps) {
203 mrb_full_gc(mrb);
204 p2 = (mrb->allocf)(mrb, p, len, mrb->allocf_ud);
(lldb) bt
View multiple.rb
require 'rubygems'
require 'bundler/setup'
require 'rom'
require 'rom/memory'
require 'rom/sql'
sql = ROM.setup(:sql, "sqlite:memory")
sql.default.connection.create_table(:animals) do
@schmurfy
schmurfy / lldb_trace
Created Feb 26, 2015
rbx-2.5.2 sigsegv
View lldb_trace
Process 66561 stopped
* thread #1: tid = 0x83c67, 0x00000001001b0254 ruby`rubinius::GarbageCollector::scan(rubinius::ManagedThread*, bool) [inlined] rubinius::GarbageCollector::scan(this=<unavailable>, this=<unavailable>) + 63 at gc.cpp:367, name = 'rbx.ruby.main', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1)
frame #0: 0x00000001001b0254 ruby`rubinius::GarbageCollector::scan(rubinius::ManagedThread*, bool) [inlined] rubinius::GarbageCollector::scan(this=<unavailable>, this=<unavailable>) + 63 at gc.cpp:367
364 Object*** buffer = displace(vrb->buffer(), offset);
365 for(int idx = 0; idx < vrb->size(); idx++) {
366 Object** var = displace(buffer[idx], offset);
-> 367 Object* cur = *var;
368
369 if(cur && cur->reference_p() && (!young_only || cur->young_object_p())) {
370 if(Object* tmp = saw_object(cur)) {
You can’t perform that action at this time.