This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Simple "Bus" based message publish/subscribe | |
Created on 2010-01-28 | |
@author: jldupont | |
""" | |
__all__=["Bus"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
# | |
# @author: Jean-Lou Dupont | |
# | |
# need to adjust DISPLAY setting before daemonize | |
# of application relying on gobject/glib/dbus | |
# | |
## Example: | |
export DISPLAY=:0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Sending local email | |
Created on 2010-09-15 | |
@author: jldupont | |
""" | |
import smtplib | |
import getpass | |
SERVER = "localhost" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Backup my rhythmbox database over to Google Docs | |
# | |
DATE=`date +%d%m%g` | |
zip /tmp/rb${DATE} ~/.local/share/rhythmbox/rhythmdb.xml | |
/usr/local/bin/google docs upload --folder=_backup --title=rb${DATE}.zip /tmp/rb${DATE}.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip link | grep "link/ether" | awk -F" " '{print $2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ip address | grep eth0 | grep inet | awk -F" " '{print $2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* A lightweight proc & task runner | |
* | |
* runner.js | |
* | |
* @author Jean-Lou Dupont | |
* | |
* @dependencies: | |
* - oo.js ('method') | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Message Switch | |
* | |
* @desc Each subscriber gets at least the first occurence of a message-type: | |
* it is the responsibility of the subscriber to return its "interest" | |
* for a particular 'message type'. | |
* | |
* Suscribers must implement the 'mailbox' method. | |
* | |
* NOTE: 'no interest' map stored in the Agent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Map | |
* | |
* @author jldupont | |
*/ | |
package com.cdf.front.types.client; | |
import java.util.Iterator; | |
import java.util.Set; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def partial(fn, *pargs): | |
""" | |
Partial Function builder | |
>>> f=lambda p1,p2: p1+p2 | |
>>> pf=partial(f, 66) | |
>>> pf(44) | |
110 | |
""" | |
def _(*args): | |
plist=list(pargs) |
OlderNewer