Skip to content

Instantly share code, notes, and snippets.

@mono0x
mono0x / Create Network.scpt
Created October 18, 2011 11:49
Create Network (for Lion)
property NetworkName : ""
property NetworkPassword : ""
try
do shell script "/usr/sbin/scselect " & NetworkName
delay 2
end try
tell application "System Events"
@mono0x
mono0x / ActionGame.pde
Created January 25, 2012 14:44
ActionGame
int cellSize = 16;
int defaultJumpLimit = 10;
int readyState = 0;
int gameState = 1;
int clearedState = 2;
int emptyCell = 0;
@mono0x
mono0x / webbrowser.rb
Created March 6, 2012 13:08
Open URI with default web browser
# -*- coding: utf-8 -*-
require 'uri'
class WebBrowser
def self.open(uri)
uri = URI.parse(uri.to_s)
unless %w[ http https ftp file ].include?(uri.scheme)
raise ArgumentError
end
@mono0x
mono0x / nicoalert-growl.rb
Created March 8, 2012 09:38
Niconama Alert
# -*- coding: utf-8 -*-
require 'nicoalert'
require 'ruby_gntp'
#require_relative 'webbrowser'
MAIL = ''
PASSWORD = ''
@mono0x
mono0x / lisa_blog_reader.user.js
Created March 31, 2012 02:40
LiSA Official Blog Reader
// ==UserScript==
// @name LiSA Official Blog Reader
// @namespace http://monoweb.info/
// @include http://ameblo.jp/lxixsxa/*
// @version 1.0.0
// ==/UserScript==
Array.prototype.forEach.call(document.querySelectorAll('.subContents'), function(content) {
var html = content.innerHTML;
html = html.replace(/([^>])<br><br>([^<])/g, '$1$2');
html = html.replace(/<br>(\s*<br>)+/g, '<br>');
@mono0x
mono0x / fix_cinii_links.user.js
Created May 11, 2012 13:03
CiNiiの検索結果に付いているJavaScriptを削除
@mono0x
mono0x / pixivcache.cmd
Created May 15, 2012 13:26
Pixivの画像をキャッシュするプロキシサーバ
call nvmw use v0.8.8
node pixivcache.js
# -*- coding: utf-8 -*-
class Expression
attr_reader :value
def initialize(tokens)
left = Term.new(tokens)
@value = left.value
until tokens.empty?
op = tokens.first
@mono0x
mono0x / evernote.hide_message.user.js
Created June 26, 2012 14:37
Evernoteのウザいメッセージを消す
// ==UserScript==
// @name Hide cumbersome message from Evernote
// @namespace http://monoweb.info/
// @include https://www.evernote.com/pub/*
// ==/UserScript==
function close() {
var element = document.querySelector('.GCSKHGDCIX');
if(element !== null) {
element.click();
return true;
@mono0x
mono0x / hatena-star-user-icon.user.js
Created July 28, 2012 15:32 — forked from hitode909/hatena-star-user-icon.user.js
☆の横にユーザーアイコンを表示するGreasemonkey
// ==UserScript==
// @name hatena-star-user-icon
// @namespace http://www.hatena.ne.jp/hitode909
// @include *
// ==/UserScript==
(function(){
var user_icon = function(name) {
return "http://www.st-hatena.com/users/" + name.slice(0, 2) + "/" + name + "/profile_s.gif";
};