Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:

Julien Ammous schmurfy

:octocat:
View GitHub Profile
@schmurfy
schmurfy / config.yaml
Created Jul 12, 2021
ytt key/value mapping
View config.yaml
#@ load("@ytt:data", "data")
#@ load("@ytt:struct", "struct")
env:
#@ for k in struct.decode(data.values.my_map):
- name: #@ k
value: #@ data.values.my_map[k]
#@ end
View test_interface.go
package main
import "fmt"
type User struct {
Name string
Age int
}
// func (u *User) GetName() string {
View mgos.c
#include "mgos.h"
#define UART 2
static void _test_cb(struct mg_rpc_request_info *ri, void *cb_arg,
struct mg_rpc_frame_info *fi, struct mg_str args) {
size_t sz
sz = mgos_uart_write(UART, "\x0C", 1);
View keybase.md

Keybase proof

I hereby claim:

  • I am schmurfy on github.
  • I am schmurfy (https://keybase.io/schmurfy) on keybase.
  • I have a public key ASB5-3cv5BG4ls8k3NnofbmC1hS2SyzcMQ4YHSm1VKlD0Qo

To claim this, I am signing this object:

@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