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
# paste contents of clipboard to emacs scratch buffer | |
tell application "Emacs" | |
activate | |
tell application "System Events" | |
keystroke "x" using {control down} | |
keystroke "b*scratch*" | |
keystroke return | |
keystroke ">" using {option down} | |
keystroke return |
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
-- SL4A Lua script to send SMS from Llama | |
-- Llama action is "Run App Shortcut" / Scripts | |
require "android" | |
android.smsSend("3155551212", "I have left work") |
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/env ruby | |
require 'RMagick' | |
require 'meme_captain' | |
require 'open-uri' | |
require 'twitter' | |
tweet = Twitter.status(ARGV[0]) | |
img = Magick::Image::read(tweet.user.profile_background_image_url)[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
# configuring networking in Windows with a script | |
# set interface to dhcp | |
netsh interface ip set address name="Local Area Connection" dhcp | |
netsh interface ip set dns "Local Area Connection" dhcp | |
# set static ip on interface | |
netsh interface ip set address name="Local Area Connection" static 192.168.0.2 255.255.255.0 192.168.0.1 1 | |
netsh interface ip set dns "Local Area Connection" static 8.8.8.8 | |
netsh interface ip add dns "Local Area Connection" 8.8.4.4 index=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
Method fromStringMethod; | |
for (Method m : port.getClass().getMethods()) { | |
if (m.getName().equals("setwisite_sessionreliability")) { | |
System.out.println(m.getName()); | |
for (Class<?> c : m.getParameterTypes()) { | |
try { | |
fromStringMethod = c.getMethod("fromString", | |
new Class<?>[] { String.class }); | |
} catch (Exception e) { |
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
#++ | |
# | |
# :title: Meme generator plugin for rbot. | |
# | |
# Author:: Matthew M. Boedicker <matthewm@boedicker.org> | |
# | |
# Copyright:: (c) 2011 Matthew M. Boedicker | |
# | |
# License:: MIT | |
# |
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
sudo apt-get install ufw | |
sudo ufw default deny | |
sudo ufw allow ssh/tcp | |
sudo ufw allow http | |
sudo ufw logging on | |
sudo ufw enable | |
sudo ufw status |
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/env ruby | |
# tail -f /var/log/messages | ufw_block_notify.rb | |
require 'resolv' | |
rbot_remote = '/home/mmb/src/rbot/bin/rbot-remote' | |
rbot_user = '' | |
rbot_password = '' | |
channel = '' |
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
require 'RMagick' | |
# convert image intro retro 8-bit looking image | |
# http://matthewm.boedicker.org/ | |
# find NES, SNES, etc. palette image on the web | |
palette = Magick::ImageList.new('/tmp/Palette_NTSC.png') | |
img = Magick::ImageList.new('/tmp/input.jpg') |
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
require 'httparty' | |
class GoogleApi | |
include HTTParty | |
base_uri 'www.google.com/ig/api' | |
def self.weather(place) | |
get('', :query => { :weather => place })['xml_api_reply']['weather'] | |
end |