Skip to content

Instantly share code, notes, and snippets.

View mdusher's full-sized avatar

Michael Usher mdusher

View GitHub Profile
@mdusher
mdusher / toast-openWeather.rb
Created January 20, 2015 08:32
Crappy Weather plugin for toast (cinch bot)
#! /usr/bin/env ruby
#
# Forecasts ftp://ftp2.bom.gov.au/anon/gen/fwo/IDA00001.dat
#
#
require 'cinch'
require 'nokogiri'
require 'open-uri'
#!/usr/bin/env ruby
require 'faraday'
require 'nokogiri'
require 'yaml'
require 'json'
require 'cgi'
class MultiWeather
def initialize(*)
#!/usr/bin/env ruby
require 'cinch'
require 'open-uri'
require 'nokogiri'
require 'cgi'
module Cinch::Plugins
class YoURLS
include Cinch::Plugin
#!/usr/bin/env ruby
#
# Scans directory every at an interval for files, reads all files and creates a pushbullet list notification
# Files must have at least 2 lines, the first line is the title used for the notification (groups by this) and the second the message
# Multiple lines can be added to one file
#
require 'eventmachine'
require 'faraday'
require 'daemons'
@mdusher
mdusher / WebTwitterplusplus.user.js
Last active January 18, 2016 23:51
I hate some of the crap Twitter has put in the timeline.
// ==UserScript==
// @name WebTwitter++
// @version 0.1
// @description WebTwitter++
// @author Michael Usher <[email protected]>
// @match *://twitter.com/*
// @grant none
// @run-at document-end
// ==/UserScript==
/* jshint -W097 */
@mdusher
mdusher / keybase.io
Created March 25, 2016 05:28
Keybase
### Keybase proof
I hereby claim:
* I am mdusher on github.
* I am mushyyyy (https://keybase.io/mushyyyy) on keybase.
* I have a public key whose fingerprint is 1384 562D FA88 CDEB 0CA4 7C74 B308 6501 3043 ABD5
To claim this, I am signing this object:
@mdusher
mdusher / Caddyfile
Created April 11, 2016 00:48
Caddyfile for Owncloud (work-in-progress)
cloud.usher.is {
tls [email protected]
root /owncloud
errors {
403 /core/templates/403.php
404 /core/templates/404.php
}
@mdusher
mdusher / ImproveTwitterWeb.user.js
Last active July 15, 2016 01:13
Improves usability of Twitter Web
// ==UserScript==
// @name ImproveTwitterWeb
// @version 0.1
// @description Improves usability of Twitter Web
// @author Michael Usher
// @match https://www.twitter.com/*
// @match https://twitter.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
// ==UserScript==
// @name NewTweetClicker
// @version 0.1
// @description Clicks the new tweet bar automatically
// @author Michael Usher
// @match https://www.twitter.com/*
// @match https://twitter.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
@mdusher
mdusher / safetydance.rb
Last active July 19, 2018 01:29
safetydance.rb
#!/usr/bin/env ruby
require 'twitter'
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY"
config.consumer_secret = "YOUR_CONSUMER_SECRET"
config.access_token = "YOUR_ACCESS_TOKEN"
config.access_token_secret = "YOUR_ACCESS_SECRET"
end