Skip to content

Instantly share code, notes, and snippets.

View gbrault's full-sized avatar
🏠
Working from home

Gilbert Brault gbrault

🏠
Working from home
View GitHub Profile
@gbrault
gbrault / text2image.html
Created March 20, 2017 17:07
put text into image (to avoid CORS)
<!DOCTYPE html>
<html>
<body>
<canvas id="myCanvas" width="300" height="150" style="border:1px solid #d3d3d3;">
Your browser does not support the HTML5 canvas tag.</canvas>
<script>
var c = document.getElementById("myCanvas");
https://github.com/netbeast/docs/wiki/Cross-Compile-Nodejs-for-OpenWrt
@gbrault
gbrault / gist:a42b012d774d2d26c70808859a017140
Created April 15, 2017 13:37
how to ssh a docker container
- create an ubuntu docker container with kitematic
- load ssh-server with apt-get
- edit /etc/ssh/ssh_config and undash PasswordAuthentication yes
- restart ssh (su + service ssh restart)
- add a new user in the admin
example: adduser gbrault
then usermod -aG sudo gbrault
- add an host port 2222 to container 22 in kitematic
open localhost:2222 with winscp or putty
@gbrault
gbrault / gist:faaa617380c986d48b143de54e3fb278
Last active October 28, 2017 07:57
Embeded device shops
https://www.netblocks.eu
http://sandboxelectronics.com
http://www.kaayee.com/
http://www.ifroglab.com
http://www.lilygo.cn
http://www.rakwireless.com/en/
https://www.futurashop.it
https://bsfrance.fr
http://www.dorji.com/
https://www.digitalsmarties.net/ (jeelab shop)
@gbrault
gbrault / dev tool install.txt
Created February 26, 2018 14:42
node js dev tool install
npm install -g windows-build-tools
@gbrault
gbrault / splitter.html
Created February 27, 2018 06:34
html div based splitter
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
(function () {
/**
* THIS OBJECT WILL ONLY WORK IF your target is positioned relative or absolute,
@gbrault
gbrault / split-four.html
Created February 27, 2018 08:51
split a window into four adjustable divisions
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script>
(function () {
/**
* THIS OBJECT WILL ONLY WORK IF your target is positioned relative or absolute,
@gbrault
gbrault / callsyncinasync.py
Created May 10, 2019 14:01
Calling synchronous code from asyncio
import asyncio
import time
from urllib.request import urlopen
@asyncio.coroutine
def count_to_10():
for i in range(11):
print("Counter: {}".format(i))
yield from asyncio.sleep(.5)