Skip to content

Instantly share code, notes, and snippets.

View mathematicalcoffee's full-sized avatar

Amy Chan mathematicalcoffee

  • Australia
View GitHub Profile
@mathematicalcoffee
mathematicalcoffee / 3.2_3.4_icon_in_notification.js
Created December 12, 2012 00:14
Code snippets demonstrating how to send a notification to the user in GNOME-shell 3.2, 3.4 and 3.6
/** GNOME 3.2 and 3.4: sending a notification to the user.
* In this example we provide the Source's icon through the notification rather than the source
* (note the 'icon:' property in the object provided as the fourth parameter to the Notification.)
*/
// 1. Make a source
let source = new MessageTray.Source("source title");
// 2. Make a notification
let notification = new MessageTray.Notification(source,
"notification title",
"notification message",
@mathematicalcoffee
mathematicalcoffee / blogger-to-jekyll.rb
Last active August 29, 2015 14:04
Convert posts from httrack of blogger/blogspot to jekyll format. Run from top folder.
#!/usr/bin/ruby
# convert posts from httrack of blogger/blogspot to jekyll format
# run from top folder.
require 'nokogiri'
require 'reverse_markdown'
require 'fileutils'
require 'date'
OUT_DIR = '_posts'