Skip to content

Instantly share code, notes, and snippets.

@Milly
Milly / cman.sh
Created January 16, 2015 10:06
color man command `cman` (16 or 256 colors)
# vim: set ft=sh:
function cman () {
local e=$'\e['
local highlight='1:31'
local underline='4;36'
local search='1;37;43'
[[ "${TERM}" == "${TERM/256}" ]] || {
highlight='1;38;05;166'
underline='4;38;05;75'
@Milly
Milly / netvolante-update.lua
Created May 13, 2014 12:01
Netvolante DNS サービスを多段ルータの内側で利用する Lua スクリプト
-- netvolante-update.lua
-- Last Modified: 13 May 2014.
--[[
# brief
Netvolante DNS サービスを多段ルータの内側で利用する Lua スクリプトです。
VLAN ポートに一時的にグローバルIPを付与して Netvolante サービスに登録を行います。
@Milly
Milly / README.html
Last active August 29, 2015 13:59
bitly bitmarklet fix.
<html>
<body>
Bookmarklet:
<a href="javascript:(function(d,a,b,s)%7Bif(s=d.getElementById(b))%7Bs.parentNode.removeChild(s);alert(%22bitly%20closed%22);return;%7Ds=d.createElement(%22script%22);s%5Ba%5D(%22id%22,%22bitmark_js%22);s%5Ba%5D(%22type%22,%22text/javascript%22);s%5Ba%5D(%22src%22,%22//bitly.com/a/bitmarklet.js%22);d.addEventListener(%22load%22,function(e,f)%7Bf=d.getElementById(b);if(e.target===f)f.style.height=f.style.width=%22100%25%22;%7D,true);(d.body%7C%7Cd.getElementsByTagName(%22head%22)%5B0%5D).appendChild(s);%7D)(top.document,%22setAttribute%22,%22bitmark_yoself_fool%22);">&#x271a; bitmark</a>
</body>
@Milly
Milly / Flickr_short_link.user.js
Last active September 2, 2018 17:47
Add short url link to flicker photostream and photo page.
@Milly
Milly / googlemapsshowcoords.user.js
Last active September 2, 2018 17:47
Creates a link on Google Maps to show the map centre lat/lon coordinates.
// ==UserScript==
// @author Milly
// @name Google Maps Show Coords Link
// @namespace http://d.hatena.ne.jp/MillyC/
// @description Creates a link on Google Maps to show the map centre lat/lon coordinates.
// @include http://maps.google.tld/*
// @include http://www.google.tld/local*
// @include http://www.google.tld/maps*
// @include https://maps.google.tld/*
// @include https://www.google.tld/local*
@Milly
Milly / tumblr_control.user.js
Last active September 2, 2018 17:47
Add control buttons to tumblr post (Reblog, Edit) Tumblr の個別ポストに「Reblog」「Edit」ボタンを追加します。
// ==UserScript==
// @name Tumblr Control
// @namespace https://twitter.com/Milly
// @description Add control buttons to tumblr post (Reblog, Edit)
// @include http://*.tumblr.com/post/*
// @grant GM_addStyle
// ==/UserScript==
GM_addStyle([
'.my-tumblr-control-buttons {',
@Milly
Milly / gist:2938280
Created June 15, 2012 19:18 — forked from avocado3/gist:1801194
Bookmarklet:open Pixitail by illust_id
javascript:void(function(id){if(id)location.href="pixitail://org.cathand.pixitail/pixiv/"+id}((/illust_id=(\d+)/.exec(location.href)||[])[1]||prompt("illust_id")))
@Milly
Milly / gist:2924777
Created June 13, 2012 15:30 — forked from xyzzy-17-638/gist:1992293
Gitチートシート

Gitチートシート

msysGitをインストール後、 「スタート」>「Git」>「Git Bash」を実行して Git Bash を立ち上げ、 以下のコマンドを実行することで、さまざまな作業を行えます

簡単な用語集

@Milly
Milly / iRemoconProxy.rb
Created January 8, 2012 12:44
iRemocon Proxy
#!/usr/bin/env ruby
# iRemocon Proxy
#
# Author: Milly
# Last update: Jan 9 2012
require "socket"
@remote_host = ARGV[0]
unless @remote_host
@Milly
Milly / gem-fetch-dependencies
Created April 8, 2011 09:43
Extend 'gem fetch' command. Fetch all dependencies.
#!/usr/bin/ruby
require 'rubygems'
require 'rubygems/commands/fetch_command'
class Gem::Commands::FetchCommand
def add_version_option_with_fetch_depends
add_version_option_without_fetch_depends
add_option('-y', '--[no-]dependencies',
"Fetch dependent gems") do |value, options|