Skip to content

Instantly share code, notes, and snippets.

View k33g's full-sized avatar
💭
Read my code at https://gitlab.com/k33g

Philippe Charrière k33g

💭
Read my code at https://gitlab.com/k33g
View GitHub Profile
module github.com/bots-garden/capsule/capsule-http
go 1.20
require github.com/tetratelabs/wazero v1.1.0 // indirect
require (
github.com/bots-garden/capsule-host-sdk v0.0.1
github.com/gofiber/fiber/v2 v2.44.0
)

Keybase proof

I hereby claim:

  • I am k33g on github.
  • I am k33g (https://keybase.io/k33g) on keybase.
  • I have a public key ASAvVVJc_l0qLskykv6CDC9l0gvGedBfs_msgZg0T8pznwo

To claim this, I am signing this object:

@k33g
k33g / make-manifest.js
Created October 23, 2011 14:41
Nodejs script -> create manifest (cache)
var lib = require("./manifest.js");
lib.mkmanifest({
filename : "cache"
,path : "../coffee"
,version : "02"
,exclude : ['/.DS_Store', '/.htaccess', '/cache.manifest']
/*
,network : ['/connect.php','/read.php']
,fallback : ['/offline.html']
@k33g
k33g / Dockerfile
Last active September 28, 2019 16:30
FROM node:12.7.0-alpine
WORKDIR /home/app
COPY . .
RUN npm install
RUN addgroup -S app \
&& adduser app -S -G app
RUN chown app:app -R /home/app
WORKDIR /home/app
@k33g
k33g / gist:3959903
Created October 26, 2012 16:57
Patterns & Typescript

##The Singleton Pattern

class SantaClaus {

	private static uniqueInstance : SantaClaus;
	
@k33g
k33g / dsl.mqtt.golo.md
Last active May 2, 2019 01:38
mqtt.golo
module iot_one

# Publishing

import littleIOT
import talkToMQTTBroker # it's a promise
import noticeable

import gololang.concurrent.workers.WorkerEnvironment
@k33g
k33g / RaspBerry_Pi.md
Created August 17, 2012 12:01
RaspBerry Pi
@k33g
k33g / index.html
Last active April 18, 2019 05:49
Vue.js + ES6
<div id="demo">
<h1>{{bob.fields.firstName}} {{bob.fields.lastName}}</h1>
</div>
<ul id="humans-list">
<li v-repeat="humans">
{{fields.firstName}} {{fields.lastName}}
</li>
</ul>
@k33g
k33g / project-create.sh
Last active November 28, 2018 14:14 — forked from francoisromain/project-create.sh
A bash script to create a Git post-receive hook to deploy after a Git push
#!/bin/sh
# Call this file with `bash ./project-create.sh project-name [service-name]`
# project-name is mandatory
# service-name is optional
# This will creates 3 directories and a git `post-receive` hook.
# - $GIT: a git repo
# - $TMP: a temporary directory for deployment
# - $WWW: a directory for the actual production files
@k33g
k33g / MongoDbHelper.js
Last active July 9, 2018 14:28
Playing with node-mongodb-native and ECMAScript 6 and Express
/**
* Created by k33g_org on 24/10/14.
*/
import mongodb from 'mongodb';
import uuid from 'node-uuid';
/*
http://mongodb.github.io/node-mongodb-native/2.0/tutorials/crud_operations/
*/