Skip to content

Instantly share code, notes, and snippets.

View dolanor's full-sized avatar

Tanguy ⧓ Herrmann dolanor

  • Strasbourg, France
View GitHub Profile
@dolanor
dolanor / import_cacert_java.sh
Created October 16, 2014 10:10
Import CACert root and class3 certificate to the java keystore with keytool
# From http://wiki.cacert.org/FAQ/ImportRootCert#Java
curl -O http://www.cacert.org/certs/root.crt
curl -O http://www.cacert.org/certs/class3.crt
sudo keytool -keystore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts -import -trustcacerts -v -alias cacertclass1 -file root.crt
sudo keytool -keystore /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/security/cacerts -import -trustcacerts -v -alias cacertclass3 -file class3.crt
@dolanor
dolanor / base_epigraphy.kml
Created February 16, 2015 23:28
kml import
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:ns2="http://www.google.com/kml/ext/2.2" xmlns:ns3="http://www.w3.org/2005/Atom" xmlns:ns4="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0">
<Document>
<Schema name="base_epigraphy_1" id="base_epigraphy_1">
<SimpleField type="string" name="Noms"/>
<SimpleField type="string" name="références"/>
<SimpleField type="string" name="Lieu/cité"/>
<SimpleField type="string" name="INSEE"/>
<SimpleField type="string" name="coord. X"/>
<SimpleField type="string" name="coord.Y"/>
@dolanor
dolanor / wait.sh
Created August 3, 2016 10:42
A wait script that will return the list of the return code for a list of pid that we want to wait on
#!/bin/bash
# to get pids, you can just do a
# myprocess &
# pids+="$! "
pids="$@"
rets=""
for i in $pids
do
@dolanor
dolanor / volumetric-clouds.glsl
Created September 30, 2016 11:09
Volumetric clouds GLSL webGL
// Created by inigo quilez - iq/2013
// License Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
// Volumetric clouds. It performs level of detail (LOD) for faster rendering
float noise( in vec3 x )
{
vec3 p = floor(x);
vec3 f = fract(x);
f = f*f*(3.0-2.0*f);
@dolanor
dolanor / chaincode_query.go
Created February 20, 2017 11:52
Query some HyperLedger chaincode from Go
package main
import (
"fmt"
"github.com/hyperledger/fabric/peer/chaincode"
pb "github.com/hyperledger/fabric/protos/peer"
)
func main() {

Keybase proof

I hereby claim:

  • I am dolanor on github.
  • I am dolanor (https://keybase.io/dolanor) on keybase.
  • I have a public key ASBNfq-OLmmKKwcaQweZRBcccNIhaObYYay0XeFudV5GGQo

To claim this, I am signing this object:

@dolanor
dolanor / slice_test.go
Created January 2, 2018 15:05
Check speed of iterating with an index or the ranged value
package main_test
import (
"testing"
)
type Whatever struct {
a, b, c int
}
@dolanor
dolanor / dovecot.conf
Created January 21, 2018 20:26
mail server conf
# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 4.4.0-109-generic x86_64 Ubuntu 14.04.5 LTS ext4
# NOTE: Send doveconf -n output instead when asking for help.
auth_anonymous_username = anonymous
auth_cache_negative_ttl = 1 hours
auth_cache_size = 0
auth_cache_ttl = 1 hours
auth_debug = no
auth_debug_passwords = no
auth_default_realm =
@dolanor
dolanor / mssql-odbc-go.sh
Created May 22, 2019 21:06
Test Go ODBC compatibility with a contained MS SQL Server instance
#!/bin/bash
set -e
cid=`docker run --name go-odbc-mssql-server -d -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=notVERYstrongP455word.' -d mcr.microsoft.com/mssql/server:2017-CU8-ubuntu`
mssqlIP=$(docker inspect --format "{{ .NetworkSettings.Networks.bridge.IPAddress }}" ${cid})
docker run --rm -it golang:1.12 sh -c "
apt update
apt install -y tdsodbc unixodbc-dev freetds-bin
cat > /etc/odbcinst.ini << EOF
package main
import (
"gioui.org/app"
"gioui.org/font/gofont"
"gioui.org/io/system"
"gioui.org/layout"
"gioui.org/widget"
"gioui.org/widget/material"
)