Skip to content

Instantly share code, notes, and snippets.

View jmbarbier's full-sized avatar

Jean-Matthieu BARBIER jmbarbier

View GitHub Profile
@syntaqx
syntaqx / cloud-init.yaml
Last active June 12, 2024 12:59
cloud init / cloud config to install Docker on Ubuntu
#cloud-config
# Option 1 - Full installation using cURL
package_update: true
package_upgrade: true
groups:
- docker
system_info:
@teknoraver
teknoraver / unixhttpc.go
Last active March 21, 2024 11:48
HTTP over Unix domain sockets in golang
package main
import (
"context"
"flag"
"fmt"
"io"
"net"
"net/http"
"os"
@PhilterPaper
PhilterPaper / HTML2PDF.pl
Created August 31, 2015 22:39
Wrapper to add page numbers to TOC and links for wkhtmltopdf processing
# wrapper for wkhtmltopdf and pdftk to update links with actual page numbers
# TOC entries get leader dots and page number . . . NN
# internal links (#id) get [page NN]
# written by Phil M Perry
# (c) copyright 2015, Phil M Perry
# license: GNU Lesser General Public License (LGPL) v3
#
use warnings;
# it's a quick & dirty job that doesn't have many safeguards. use at your own
# risk. anyone is welcome to improve upon it!
@stuart-warren
stuart-warren / simple-gpg-enc.go
Last active May 20, 2024 09:57
golang gpg/openpgp encryption/decryption example
package main
import (
"bytes"
"code.google.com/p/go.crypto/openpgp"
"encoding/base64"
"io/ioutil"
"log"
"os"
)
@dbrgn
dbrgn / mixins.py
Last active September 13, 2018 20:44
Moved to https://github.com/dbrgn/drf-dynamic-fields
@thoop
thoop / nginx.conf
Last active December 8, 2023 21:55
Official prerender.io nginx.conf for nginx
# Change YOUR_TOKEN to your prerender token
# Change example.com (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
server_name example.com;
root /path/to/your/root;
index index.html;
@Guigoz
Guigoz / SUBLIME TEXT 2 : keyboard shortcuts for AZERTY keyboards
Last active May 2, 2020 20:46
SUBLIME TEXT 2 : keyboard shortcuts for AZERTY keyboards
{ "keys": ["ctrl+œ"], "command": "show_panel", "args": {"panel": "console", "toggle": true} },
{
"keys": ["super+alt+&"],
"command": "set_layout",
"args":
{
"cols": [0.0, 1.0],
"rows": [0.0, 1.0],
"cells": [[0, 0, 1, 1]]
@joshdmiller
joshdmiller / Gruntfile.js
Last active December 12, 2015 07:58
A Grunt 0.4 build system for modularized AngularJS projects.
/**
* A Boilerplate Grunt ~0.4.0 build system for AngularJS projects
*
* Licensed MIT
*/
module.exports = function ( grunt ) {
// Load required Grunt tasks
grunt.loadNpmTasks('grunt-recess');
grunt.loadNpmTasks('grunt-contrib-clean');
@niwinz
niwinz / test.py
Created January 19, 2013 23:44
Support for patch method to django client.
from django.test import client
# Call this function on head of your test file.
def patch_request_factory():
def _method(self, path, data='', content_type='application/octet-stream', follow=False, **extra):
response = self.generic("PATCH", path, data, content_type, **extra)
if follow:
response = self._handle_redirects(response, **extra)
return response
@niclashoyer
niclashoyer / literate_coffee_script.lang
Last active December 10, 2015 21:18
Syntax highlighting for Literate CoffeeScript in gtksourceview, e.g. gedit.
<?xml version="1.0" encoding="UTF-8"?>
<!--
Author: Niclas Hoyer <niclas@verbugt.de>
Copyright (C) 2012 Niclas Hoyer <niclas@verbugt.de>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.