Skip to content

Instantly share code, notes, and snippets.

View schmurfy's full-sized avatar
:octocat:

Julien Ammous schmurfy

:octocat:
View GitHub Profile
@schmurfy
schmurfy / deployment1.yaml
Created October 23, 2023 14:17
force_change
apiVersion: apps/v1
kind: Deployment
metadata:
name: ntp-server
spec:
template:
spec:
containers:
- name: chrony
image: "something:0"
@schmurfy
schmurfy / gist:3199254
Created July 29, 2012 14:33
Install pandoc Mac OS X 10.8
# Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg
$ sudo chown -R `whoami` /usr/local/texlive
$ tlmgr update --self
$ tlmgr install ucs
$ tlmgr install etoolbox
# Install pandoc view homebrew
@schmurfy
schmurfy / config.yaml
Created July 12, 2021 13:54
ytt key/value mapping
#@ 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
package main
import "fmt"
type User struct {
Name string
Age int
}
// func (u *User) GetName() string {
#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);

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 / mount-ram.sh
Created September 11, 2011 00:13 — forked from koshigoe/mount-ram.sh
Like tmpfs in Mac OSX
#!/bin/sh
# This program has two feature.
#
# 1. Create a disk image on RAM.
# 2. Mount that disk image.
#
# Usage:
# $0 <dir> <size>
#
@schmurfy
schmurfy / client.c
Created September 25, 2018 15:49
mongoose_chunked
#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) {
@schmurfy
schmurfy / chunked_client.c
Created September 14, 2018 09:54
Mongoose issue
#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) {
using System;
using System.Text;
using System.Collections.Generic;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MessagePack;
using MessagePack.Formatters;
using MessagePack.Resolvers;
namespace X2Tests