Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Excited for leaning more and more

Federico Bertani federicoB

💭
Excited for leaning more and more
  • Bologna, Italy
View GitHub Profile
@staltz
staltz / introrx.md
Last active Apr 20, 2021
The introduction to Reactive Programming you've been missing
View introrx.md
@danriti
danriti / README.md
Last active Jun 10, 2020
Line Profiling in Python
View README.md

Install the line_profiler module:

[driti@ubuntu ]$ pip install line_profiler

Add the @profile decorator and run:

[driti@ubuntu ]$ kernprof.py -l -v example.py
@elundmark
elundmark / live_webcam_wallpaper_ubuntu.sh
Created Feb 22, 2013
Live Webcam Wallpaper Script for Ubuntu
View live_webcam_wallpaper_ubuntu.sh
#!/bin/bash
# Updates your desktop with an hourly updated image from (in this case Ocean Beach, SF) a webcam jpeg url.
# Uses: cronjob, curl, convert, gsettings
# Example screenshot: https://dl.dropbox.com/u/1907097/live_webcam_wallpaper_ubuntu.png
# My cronjob setup, runs on minute :01 every hour
# 1 * * * * /path/to/live_webcam_wallpaper_ubuntu.sh &> /dev/null
if [[ -z "$DBUS_SESSION_BUS_ADDRESS" ]]; then
source "$HOME/.dbus/session-bus"/*-0 && export DBUS_SESSION_BUS_ADDRESS