Skip to content

Instantly share code, notes, and snippets.

View Gui13's full-sized avatar

Guillaume Gui13

  • Braincube
  • France
View GitHub Profile
@Gui13
Gui13 / 360.py
Created January 24, 2018 07:20
Xbox control of pan tilt hat
import xbox
import pantilthat
import time
PAN_MAX = 90
PAN_MIN = -90
TILT_MAX = 90
@Gui13
Gui13 / paperkey.sh
Created October 5, 2017 14:01
PaperKey with Bash
#!/bin/bash
# Hello HN!
# to read back the chunks, use zbarcam.
if [ "$#" -ne "1" ]; then
echo "Please specify the private key file (should be in PEM format)"
exit 1
fi
private_key=$1

Keybase proof

I hereby claim:

  • I am gui13 on github.
  • I am xgbi (https://keybase.io/xgbi) on keybase.
  • I have a public key ASABaqRupDOqYfHGChOkCCZGQkGHuaAGlKPmMXlBixLAqQo

To claim this, I am signing this object:

#!/bin/bash
SAVEDIR=/home/pi/timelapse/img
TIME_NIGHT_START=2035
TIME_NIGHT_STOP=700
# temp
TEMP=$(cat /home/pi/temperature)
HUM=$(cat /home/pi/humidity)
@Gui13
Gui13 / BBB.md
Created April 4, 2015 12:01
Build linphone on BBB

BeagleBone Black & Linphone

  1. Install what's needed to compile:

    sudo apt-get install automake autoconf gnu-standards gettext build-essential pkg-config git libtool antlr3 libantlr3c-dev intltool
    git clone git://git.linphone.org/polarssl
    

git clone git://git.linphone.org/belle-sip

@Gui13
Gui13 / rpi2.patch
Created March 30, 2015 07:34
Rpi2 compilation
diff --git a/Makefile b/Makefile
index e577430..f7102c7 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@ PWD=$(shell pwd)
build-desktop clean-desktop \
build-flexisip clean-flexisip \
build-flexisip-rpm clean-flexisip-rpm \
- build-python clean-python build-python-raspberry \
+ build-python clean-python build-python-raspberry build-py-pi2 \
@Gui13
Gui13 / antlr3.rb
Last active August 29, 2015 14:08
Antlr3 Brew file
require 'formula'
class Antlr3 < Formula
# Antlr4 is the current main, but some people may need Antlr3,
# which has support for a C API.
url "http://www.antlr3.org/download/antlr-3.4-complete.jar"
version '3.4'
homepage 'http://www.antlr.org/'
sha1 '5cab59d859caa6598e28131d30dd2e89806db57f'
@Gui13
Gui13 / antlr3.rb
Created October 27, 2014 14:15
Antlr3 Brew
require 'formula'
class Antlr < Formula
url "http://www.antlr3.org/download/antlr-3.4-complete.jar"
version '3.4'
homepage 'http://www.antlr.org/'
md5 '1b91dea1c7d480b3223f7c8a9aa0e172'
def install
prefix.install "antlr-3.4-complete.jar"
@Gui13
Gui13 / gtk-mac-integration.rb
Created October 27, 2014 13:43
gtk-mac-integration 2.0.5 brew
require 'formula'
class GtkMacIntegration < Formula
homepage 'https://live.gnome.org/GTK+/OSX'
url 'ftp://ftp.gnome.org/pub/gnome/sources/gtk-mac-integration/2.0/gtk-mac-integration-2.0.5.tar.xz'
sha1 '74e43c2fff14ca4aff3a8f6c35660bedc7a349a1'
head 'git://git.gnome.org/gtk-mac-integration'
depends_on 'pkg-config' => :build
depends_on 'xz' => :build
@Gui13
Gui13 / gist:7667132
Created November 26, 2013 22:02
Time analysis of coldsweat run in Raspberry Pi with 63 feeds
Refresh completed. See log file for more information
164382 function calls (158299 primitive calls) in 1103.750 seconds
Ordered by: internal time
ncalls tottime percall cumtime percall filename:lineno(function)
40 1098.679 27.467 1098.679 27.467 {method 'acquire' of 'thread.lock' objects}
951/186 0.553 0.001 1.499 0.008 sre_parse.py:379(_parse)
1839/177 0.406 0.000 1.017 0.006 sre_compile.py:32(_compile)
10952 0.296 0.000 0.352 0.000 sre_parse.py:182(__next)