Skip to content

Instantly share code, notes, and snippets.

@vallettea
vallettea / odroid-c1.md
Last active August 29, 2015 14:20
Preparing Odoid-c1 for combat

configure network

resize partition

cd /tmp
wget -O resize.sh http://forum.odroid.com/download/file.php?id=502&sid=6afc415a6c6c7f04560e1ecce3960554
chmod +x resize.sh
sudo ./resize.sh
sudo reboot
@vallettea
vallettea / nodejs_arm7.md
Last active July 14, 2025 04:47
Install node.js on Arm7 architecture (Raspberry Pi, Odroid etc)

Easy way: compile version

wget https://s3-eu-west-1.amazonaws.com/conoroneill.net/wp-content/uploads/2015/02/node-v0.12.0-linux-arm-pi.tar.gz
tar -zxvf node-v0.12.0-linux-arm-pi.tar.gz
cd node-v0.12.0-linux-arm-pi
sudo cp -R * /usr/local/

Compile on device

@vallettea
vallettea / scanner.md
Last active October 29, 2015 10:14
Utiliser scanner du node depuis un mac

Création d'un profil de numérisation

  • ouvrir firefox
  • aller sur http://10.33.0.4/
  • onglet "profil de numerisation"
  • appuyer sur le bouton "crée"
  • une fenêtre s'ouvre
    • "Missing plugin:
      • cliquer sur "plus d'info"
  • on se retrouve sur la page de java
@vallettea
vallettea / mongo
Last active August 29, 2015 14:18
load data and do a spatial query in mongo
docker run --name mongo_instance -v /data/context:/data -d mongo
docker exec -ti mongo_instance bash
mongorestore --db context /data/pois.json/pois/
echo 'db.pois.find( { lonlat :
{ $geoWithin :
{ $geometry :
{ type : "Polygon",
coordinates : [ [ [ 2.325612, 48.81079 ] , [ 2.325612, 48.84675 ] , [ 2.380082, 48.84675 ] , [ 2.380082, 48.81079 ] ,[ 2.325612, 48.81079 ] ] ]
@vallettea
vallettea / rssh
Last active August 29, 2015 14:18
Configure a user for scp only
sudo apt-get install rssh
sudo useradd -m -d /data/guest -s /usr/bin/rssh guest
# ask for public key
sudo mkdir /data/guest/.ssh
sudo vim /data/guest/.ssh/authorized_keys # and copy it here
# edit /etc/rssh.conf and uncomment allowscp
@vallettea
vallettea / find_devices
Created April 1, 2015 11:11
Useful commands to find devices on local network
# finding raspberry pi
sudo nmap -sP 192.168.1.0/24 | awk '/^Nmap/{ip=$NF}/B8:27:EB/{print ip}'
# finding odroid
@vallettea
vallettea / docker_borads
Created March 24, 2015 22:08
docker on boards
# Rpi
#http://www.cnx-software.com/2015/03/04/raspbian-image-with-docker-1-5-0-released-for-raspberry-pi-boards/
wget http://assets.hypriot.com/hypriot-rpi-20150301-140537.img.zip
#The default username/password are pi/raspberry and root/hypriot.
# BBB
# Odroid
@vallettea
vallettea / docker_clean
Last active December 7, 2015 13:46
Clean docker
## to check file and directories that are taking place
cd /path/to/some/where
$ du -hsx * | sort -rh | head -10
docker rm -v (docker ps -a | grep Exited | awk '{print $1}')
docker rmi (docker images -aq)
## to clean orphaned volumes
https://github.com/chadoe/docker-cleanup-volumes
@vallettea
vallettea / sigma.min.js
Created January 20, 2015 08:15
the top one is the working version taken from the source of the post http://yomguithereal.github.io/articles/node-border-renderer/ and the bottom one was downloaded from the official sigma website
/* sigma.js - A JavaScript library dedicated to graph drawing. - Version: 1.0.3 - Author: Alexis Jacomy, Sciences-Po Médialab - License: MIT */
(function(){"use strict";var a={},b=function(c){var d,e,f,g,h;b.classes.dispatcher.extend(this);var i=this,j=c||{};if("string"==typeof j||j instanceof HTMLElement?j={renderers:[j]}:"[object Array]"===Object.prototype.toString.call(j)&&(j={renderers:j}),g=j.renderers||j.renderer||j.container,j.renderers&&0!==j.renderers.length||("string"==typeof g||g instanceof HTMLElement||"object"==typeof g&&"container"in g)&&(j.renderers=[g]),j.id){if(a[j.id])throw'sigma: Instance "'+j.id+'" already exists.';Object.defineProperty(this,"id",{value:j.id})}else{for(h=0;a[h];)h++;Object.defineProperty(this,"id",{value:""+h})}for(a[this.id]=this,this.settings=new b.classes.configurable(b.settings,j.settings||{}),Object.defineProperty(this,"graph",{value:new b.classes.graph(this.settings),configurable:!0}),Object.defineProperty(this,"middlewares",{value:[],configurable:!0}),Object.defineP
@vallettea
vallettea / clone
Created January 13, 2015 00:29
clone sd card
sudo dd if=/dev/rdisk1 bs=1m | gzip > ~/Desktop/pi.gz
gzip -dc ~/Desktop/pi.gz | sudo dd of=/dev/rdisk1 bs=1m