Skip to content

Instantly share code, notes, and snippets.

View chussenot's full-sized avatar

Clément Hussenot chussenot

View GitHub Profile
@chussenot
chussenot / dummy-web-server.py
Created April 20, 2021 13:10 — forked from bradmontgomery/dummy-web-server.py
a minimal http server in python. Responds to GET, HEAD, POST requests, but will fail on anything else.
#!/usr/bin/env python
"""
Very simple HTTP server in python (Updated for Python 3.7)
Usage:
./dummy-web-server.py -h
./dummy-web-server.py -l localhost -p 8000
Send a GET request:
@chussenot
chussenot / bash-template.sh
Created April 16, 2020 07:23 — forked from PhilipSchmid/bash-template.sh
Bash script template (incl. logging functions)
#!/bin/bash
#################################
# Constants / global variables
#################################
LOGFILE='example.log'
LOGLEVEL='INFO'
#################################
# Functions
@chussenot
chussenot / installNeovim.sh
Created January 6, 2020 12:55 — forked from darcyparker/installNeovim.sh
Build and install neovim for Debian
#!/usr/bin/env bash
#Build and install neovim for Debian
#See: https://neovim.io/
#See: https://github.com/neovim/neovim/wiki/Building-Neovim#quick-start
#Save current dir
pushd . > /dev/null
#Install dependencies
@chussenot
chussenot / _README.md
Created July 2, 2019 11:46 — forked from kennethkalmer/_README.md
Simple start with InfluxDB & Grafana using Travis as a source of historical data

InfluxDB & Grafana starter pack

Simple example of how easy it is to jam numbers into InfluxDB and graph something with Grafana. I choose to use Travis as a source of historical time-series data.

Dependencies

Get InfluxDB installed with Homebrew

$ brew install influxdb
@chussenot
chussenot / git-gpg.md
Created July 31, 2018 12:43 — forked from bcomnes/git-gpg.md
my version of gpg on the mac
  1. brew install gnupg21, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg2 --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@chussenot
chussenot / react-cognito-auth-js.js
Created July 4, 2018 12:13 — forked from gabeweaver/react-cognito-auth-js.js
React + Cognito User Pools + Cognito Identity JS Example
/*
This example was built using standard create-react-app out of the box with no modifications or ejections
to the underlying scripts.
In this example, i'm using Google as a social provider configured within the Cognito User Pool.
Each step also represents a file, so you can see how I've chosen to organize stuff...you can do it however
you'd like so long as you follow the basic flow (which may or may not be the official way....but its what I found that works.
The docs are pretty horrible)
@chussenot
chussenot / cgroup.sh
Created June 13, 2018 22:05 — forked from teddyking/cgroup.sh
cgroup u/mounting
#!/bin/bash
set -eu
function ensureMounted() {
source=$1
shift
target=$1
shift
type=$1
@chussenot
chussenot / rocker.rb
Created June 13, 2018 21:25 — forked from sczizzo/rocker.rb
Toy container runtime in Ruby
#!/usr/bin/env ruby
# Dependencies:
# - capsh
# - cgroup-utils
# - systemd
# - ruby
#
require 'fileutils'
require 'logger'
require 'optparse'
# rubocop:disable Style/HashSyntax
# shoryuken用のタスク
namespace :queues do
desc 'Create default SNS & SQS'
task 'setup' => :environment do
# http://qiita.com/takeyuweb/items/cdc262d97c3e863c15ff
# TODO
end
desc "List all SQS queues"
@chussenot
chussenot / docker-install-rpi3.md
Created February 2, 2018 11:02 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/