Skip to content

Instantly share code, notes, and snippets.

View samueltardieu's full-sized avatar

Samuel Tardieu samueltardieu

View GitHub Profile
import akka.actor._
import akka.event.Logging
object Bug extends App {
ActorSystem("Bug").actorOf(Props[Bug])
}
class Bug extends Actor with FSM[Int, (Int, Int)] {
@samueltardieu
samueltardieu / gist:1808253
Created February 12, 2012 12:24
Free Mobile Android mobileconfig log
V/NetworkChangeReceiver( 2372): Network Change
D/FREEMOBILE( 1848): ----------------------------------- UTILS -------------------------
D/FREEMOBILE( 1848): : true
D/FREEMOBILE( 1848): R :1
D/FREEMOBILE( 1848): ### Receiver : android.net.conn.CONNECTIVITY_CHANGE
W/System.err( 1848): android.provider.Settings$SettingNotFoundException: button_mvno_roaming_key
W/System.err( 1848): at android.provider.Settings$System.getInt(Settings.java:908)
W/System.err( 1848): at fr.freemobile.android.mobileconfig.RoamingListener.checkRoamingStatus(RoamingListener.java:142)
W/System.err( 1848): at fr.freemobile.android.mobileconfig.RoamingListener.onReceive(RoamingListener.java:90)
@samueltardieu
samueltardieu / PKGBUILD
Created April 10, 2012 11:20
Working PKGBUILD for saleae-logic
# Contributor: Kyle Keen <keenerd@gmail.com>
pkgname=saleae-logic
pkgver=1.1.15
pkgrel=3
pkgdesc="High speed USB logic analyzer."
arch=(i686 x86_64)
url="http://www.saleae.com/"
license=('unknown') # closed source, none given
depends=('gcc-libs' 'gtk2' 'libice')
makedepends=()
translations missing or not in the right place for language 'de':
Only in values/strings.xml:
<string name="caches_map_locus_export">Export to Locus</string>
<string name="about_version">Version</string>
<string name="map_source_osm_mapnik">OSM: Mapnik</string>
<string name="map_source_osm_offline">OSM: Offline</string>
<string name="cache_menu_streetview">Street View</string>
<string name="cache_menu_oruxmaps">OruxMaps</string>
<string name="gpx_import_title_static_maps">Store static maps</string>
<string name="gpx_import_title_reading_file">Reading file</string>
@samueltardieu
samueltardieu / gist:3849364
Created October 7, 2012 19:48
Ledger example file
2012-10-01 Buy bitcoins
Assets:Bitcoins 2 BTC @ $11
Assets:USD
2012-10-02 Sell bitcoins
Assets:USD
Assets:Bitcoins -1 BTC (@) $10
@samueltardieu
samueltardieu / dnstop.txt
Created November 5, 2012 18:13
Main hosts querying will-spam-for-food.eu.org name server
Destinations Count % cum%
---------------- --------- ------ ------
88.190.27.159 11259 90.7 90.7
2a01:e0b:2135::1 1154 9.3 100.0
Query Type Count % cum%
---------- --------- ------ ------
A? 12401 99.9 99.9
AAAA? 4 0.0 99.9
TXT? 4 0.0 100.0
@samueltardieu
samueltardieu / gist:4071763
Created November 14, 2012 12:05
Missing c:geo Portuguese translations
translations missing or not in the right place for language 'pt':
Only in values/strings.xml:
<string name="log_today">Today</string>
<string name="log_yesterday">Yesterday</string>
<string name="log_smilies">Smilies</string>
<string name="translate_to_sys_lang">Translate to %s</string>
<string name="translate_to_english">Translate to English</string>
<string name="translate_length_warning">Translate may fail with large amounts of text.</string>
<string name="err_detail_google_maps_limit_reached">c:geo failed to download static maps. Maybe google maps limit is reached.</string>
<string name="warn_invalid_mapfile">The selected map file is not a valid mapsforge version 0.3.0 map file.\nOffline maps are not available.</string>
@samueltardieu
samueltardieu / gist:4120844
Created November 20, 2012 20:28
lsusb -v
Bus 002 Device 073: ID 08e6:5501 Gemplus GemProx-PU Contactless Smart Card Reader
Couldn't open device, some information will be missing
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
@samueltardieu
samueltardieu / gist:4512923
Created January 11, 2013 18:38
scala> ((x: Int, y: Int) => x+y).getClass.getMethods.find(_.getName == "apply").get.getParameterTypes.size res49: Int = 2
scala> ((x: Int, y: Int) => x+y).getClass.getMethods.find(_.getName == "apply").get.getParameterTypes.size
res0: Int = 2
// Le getMethods.find(_.getName == "apply") est dû au fait qu'il y a deux apply possible,
// un avec des "int", et un avec des "Object" (à cause de la possibilité de passer des
// "Integer") -- vive l'interaction avec la JVM. Mais ces deux apply auront obligatoirement
// la même arité.
@samueltardieu
samueltardieu / challenge.c
Created March 11, 2013 12:58
Le communication challenge fait en cours ce matin. Et il fonctionne :)
#include "ch.h"
#include "hal.h"
#include "lcd.h"
#define SCORED_QUIZZ 1
#define TEST_QUIZZ 2
// Define this as TEST_QUIZZ or SCORED_QUIZZ
#define QUIZZ TEST_QUIZZ