Skip to content

Instantly share code, notes, and snippets.

@mallowlabs
mallowlabs / as-image-paster.js
Created April 30, 2015 13:12
AsakusaSatellite Image Paster Plugin
// AsakusaSatellite Image Paster
(function($, document, window, undefined){
$('form.inputarea').on('paste', function(event){
var items = event.originalEvent.clipboardData.items;
for (var i = 0, l = items.length; i < l; i++) {
var item = items[i];
if (item.type.indexOf("image") == -1) {
continue;
}
@mallowlabs
mallowlabs / multi_grep.rb
Created March 3, 2015 14:51
A multiline grep.
class MultiGrep
def usage
puts "Example: ruby multi_grep.rb base.php:10-20 search/*.php"
end
def grep(argv = ARGV)
base = argv.first
path, range = base.split(":")
s, e = range.split("-").map { |i| i.to_i }
@mallowlabs
mallowlabs / jstat__heap
Last active January 17, 2018 05:17
Munin jstat__heap plugin for Oracle Java 7/8
#!/bin/bash
#
# Plugin for monitor JVM activity - Heap Usage -
#
# Usage:
#
# Symlink into /etc/munin/plugins/ and add the monitored
# alias name like :
#
# ln -s /usr/share/munin/plugins/jstat__heap \
/* for http://b.hatena.ne.jp/entrylist */
.box-wrap.box4 { display: none; }
.box-wrap.box4.top { display: block; }
li.ad-head-text { display: none; }
// ==UserScript==
// @name nicovideo thumnail popup
// @author mallowlabs
// @version 0.0.2
// @namespace http://mallowlabs.s206.xrea.com/
// @updated 2008-05-19
// @published 2007-05-22
// @license public domain
// @description Show popup of thumnail in nicovideo.jp
// @include http://www.nicovideo.jp/*
// ==UserScript==
// @name GR+?B for Opera
// @author mallowlabs
// @version 0.0.1
// @namespace http://mallowlabs.s206.xrea.com/
// @published 2007-01-16
// @license public domain
// @description show ?B button and count in Google Reader for Opera
// @include http://www.google.com/reader/view/*
// ==/UserScript==
// ==UserScript==
// @name Google Multi Search
// @author mallowlabs
// @version 0.0.3
// @namespace http://mallowlabs.s206.xrea.com/
// @published 2007-01-11
// @modified 2007-01-17
// @license public domain
// @description : Add Blog and Code search option to Google search
// @include http://www.google.co*/
// ==UserScript==
// @name googledefine_popup.user.js
// @author mallowlabs
// @version 0.0.2
// @namespace http://mallowlabs.s206.xrea.com/
// @published 2006-12-01
// @modified 2006-12-07
// @description : Popup "Google Define" by word selection
// @include http://*
//
// ==UserScript==
// @name dyeJS
// @author mallowlabs
// @namespace http://mallowlabs.s206.xrea.com/
// @version 0.0.1
// @license public domain
// @description : Syntax highlighting on JavaScript
// @published 2006-11-23
// @modified 2006-11-23
// @include *.js
// ==UserScript==
// @name googleimagefilter
// @author mallowlabs
// @namespace http://mallowlabs.s206.xrea.com/
// @version 0.0.2
// @license public domain
// @description : Add a switch that on/off the filter in Google Image Search
// @published 2006-11-12
// @modified 2007-07-16
// @include http://images.google.co.jp/*