Skip to content

Instantly share code, notes, and snippets.

View gist_link_user_js.user.js
@xr0038
xr0038 / winrec.sh
Last active Aug 29, 2015
avconv を利用して特定のウィンドウを簡単にキャプチャするためのスクリプト
View winrec.sh
#!/bin/bash
function getsize() {
xwininfo | \
awk '($1=="Absolute"){printf "%d ",$4} \
($1=="Width:"){printf "%d ", $2} \
($1=="Height:"){print $2}'
}
WININFO=(`getsize`)
@teramako
teramako / df.cmd
Last active Aug 29, 2015
Windows でディスク使用率等の一覧を表示する
View df.cmd
@if(0)==(0) ECHO OFF
CScript //NoLogo //E:JScript "%~f0" %*
GOTO :EOF
@end
var COLUMN_INFOs = {
k: {
drive: { width: 5, align: "left" },
type: { width: 4, align: "left" },
total: { width: 14, align: "right" },
View powersave
#!/usr/bin/env ruby
def sudo str
system "sudo sh -c \"#{str}\""
end
# USB の自動サスペンド
sudo "echo 1 > /sys/bus/usb/devices/usb1/power/autosuspend"
sudo "echo 1 > /sys/bus/usb/devices/usb2/power/autosuspend"
sudo "echo 1 > /sys/bus/usb/devices/usb3/power/autosuspend"
# WiFi の省電力設定
@drikin
drikin / f2t.js
Created Apr 4, 2014
Flickr2Tag Bookmarklet
View f2t.js
(function(){
var size='z';
var h=window.location.href;
var f='http://api.flickr.com/services/rest/?method=flickr.urls.lookupuser&api_key=76e0f69b613dbf2ecbd8647ab5de11da&format=json&nojsoncallback=1&url=';
var x=new XMLHttpRequest();
x.open("GET", f+h, false);
x.send(null);
var r=JSON.parse(x.responseText);
var i=r.user.id;
var b='http://flickr2tag.drikin.com/?query='+i+'&size='+size;
View hamuo
#!/usr/bin/env ruby
puts "🐹 < #{ ARGV.empty? ? ARGF.read : ARGV.join(' ') }"
View .gitignore
*~
/local/
/perl
/prove
/plackup
/Makefile.setupenv
/cin
/config/perl/libs.txt
/config/
/modules/
View dollarX.js
// Simple $X
// Thx! $X from http://coderepos.org/share/browser/lang/javascript/userscripts/jautopagerize.user.js
// http://subtech.g.hatena.ne.jp/cho45/20071114/1195017746
function $X (exp, context) {
context || (context = document);
var exp = (context.ownerDocument || context).createExpression(exp, function (prefix) {
return (document.createNSResolver((context.ownerDocument == null
? context : context.ownerDocument).documentElement)
.lookupNamespaceURI(prefix) || document.documentElement.namespaceURI);
});
View replaceStarByProfileIcon.user.js
// ==UserScript==
// @name replace star by profile icon
// @namespace http://ss-o.net/
// @description replace star by profile icon (for Firefox3)
// @include http://*.hatena.ne.jp/*
// @version 1.3
// ==/UserScript==
location.href = 'javascript:(' + function(){
var COLOR = true;