Skip to content

Instantly share code, notes, and snippets.

🤹‍♂
dotting i's and crossing t's

Yoan Blanc greut

🤹‍♂
dotting i's and crossing t's
Block or report user

Report or block greut

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am greut on github.
  • I am greut (https://keybase.io/greut) on keybase.
  • I have a public key whose fingerprint is 9E2D 407E AFEE 5086 3F42 B9D1 6058 CF45 7429 8812

To claim this, I am signing this object:

View server.clj
(ns aleph.examples.server
(:require
[compojure.core :as compojure :refer [GET]]
[aleph.http :as http]))
(defn hello-handler
[req]
{:status 200
:headers {"content-type" "text/plain"}
:body "hello\n"})
@greut
greut / template.class.php
Last active Apr 8, 2018
Oldest running code from @batiste
View template.class.php
<?php
/**
Gestion des templates avec remplacement iteratif, récursif et alternatif
@author : Batiste Bieler
@company : http://dosimple.ch
@version : 0.3
Copyright (C) 2004 Bieler Batiste
@greut
greut / clic-et-tax.txt
Created Apr 3, 2018
l'enfer des déclarations
View clic-et-tax.txt
bcmail-jdk15on-1.55.jar
bcpkix-jdk15on-1.55.jar
bcprov-jdk15on-1.55.jar
commons-beanutils-1.8.0.jar
commons-codec-1.10.jar
commons-collections-3.2.2.jar
commons-csv-1.3.jar
commons-digester-1.7.jar
commons-lang-2.6.jar
commons-logging-1.1.1.jar
View foo.py
import subprocess
with open("foo.py.gz", "wb") as f:
q = subprocess.Popen(["gzip"], stdout=f, stdin=subprocess.PIPE)
p = subprocess.Popen(["more", "foo.py"], stdout=q.stdin)
q.communicate()
p.wait()
View timeout.go
package main
import (
"context"
"fmt"
"net/http"
"time"
)
func test(a, b, c int) {
@greut
greut / meta.lua
Created Nov 13, 2017
advanced pandoc2
View meta.lua
-- read metadata file into string
local metafile = io.open('metadata.yaml', 'r')
local content = metafile:read("*a")
metafile:close()
-- new elements
local before = pandoc.RawInline('tex', '\\begin{otherlanguage}{english}')
local after = pandoc.RawInline('tex', '\\end{otherlanguage}')
@greut
greut / code-block-in-english.py
Last active Nov 7, 2017
pandoc filter for the french
View code-block-in-english.py
#!/usr/bin/env python3
"""
Convert the CodeBlock into english text. Very useful if the base language adds
some special magic rules which are altering the context. E.g. french puts a
space before the colon (:).
::
$ pandoc \
--filter ./code-block-in-english.py \
...
@greut
greut / test.go
Created Jun 12, 2017
Testing parallel processing.
View test.go
package main
import (
"fmt"
"gopkg.in/h2non/bimg.v1"
"os"
"runtime"
"strconv"
"sync"
)
@greut
greut / Main.java
Created May 29, 2017
TCP + UDP Java Echo Server.
View Main.java
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
You can’t perform that action at this time.