install
url --url=http://ftp.jaist.ac.jp/pub/Linux/Fedora/releases/18/Fedora/x86_64/os/
# Yum Repos
repo --name=fedora \
This file contains hidden or 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
#!/bin/sh | |
COMMAND=`cat <<JS | |
const Gio = imports.gi.Gio; | |
let settings = new Gio.Settings({ schema: 'org.gnome.desktop.input-sources' }); | |
let current = settings.get_uint('current'); | |
let sources = settings.get_value('sources').get_child_value(current); | |
let type = sources.get_child_value(0).unpack(); | |
if (type === 'xkb') { | |
let layout = sources.get_child_value(1).unpack(); |
This file contains hidden or 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
#!/bin/sh | |
if [ $# -lt 1 ]; then | |
echo "usage: $0 [PAGE]" | |
exit 1 | |
fi | |
OUTFILE=`mktemp` | |
BROWSER=firefox | |
PAGE=$1 |
This file contains hidden or 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
#!/bin/sh | |
if [ $# -lt 2 ]; then | |
echo "usage: $0 [DOCUMENT_ROOT] [PORT]" | |
exit 1 | |
fi | |
DOCUMENT_ROOT=$1 | |
PORT=$2 |
This file contains hidden or 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
function toIsbn13(isbn10) { | |
var digits = '978' + isbn10.substr(0, 9); | |
var tmp = digits.split('').map(function (e) { | |
return parseInt(e); | |
}).map(function (e, i) { | |
return (i % 2 == 0) ? e : e * 3; | |
}).reduce(function (a, b) { | |
return a + b; | |
}) % 10; | |
var checksum = tmp == 0 ? 0 : 10 - tmp; |
This file contains hidden or 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
JS = FileList['*.js'] | |
JS.each do |js| | |
task "#{js}" do | |
sh "perl -pe 's/(^\\s+|\\s+$)//g' < #{js} | xclip -i" | |
end | |
end |
This file contains hidden or 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/python2.7 | |
from mercurial import patch, scmutil, ui, hg | |
from datetime import datetime | |
from time import gmtime | |
from itertools import groupby | |
def changedline(ui, repo, ctx1, ctx2): | |
added, removed = 0, 0 | |
diff = ''.join(patch.diff(repo, ctx1.node(), ctx2.node())) |
This file contains hidden or 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
<?xml version="1.0"?> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
<title>MOZ CSS COLOR LIST</title> | |
<style type="text/css"> | |
#container { | |
width: 980px; | |
margin: 10px auto; | |
} |
This file contains hidden or 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
function _eclipse { | |
local cur=${COMP_WORDS[COMP_CWORD]} | |
COMPREPLY=() | |
if (($COMP_CWORD == 1)); then | |
local i | |
eclipse_home=$SOFTWARE/eclipse | |
COMPREPLY=( $( compgen -W '$( ls -d $eclipse_home-* )' $eclipse_home-$cur ) ) | |
for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do | |
COMPREPLY[i]=${COMPREPLY[i]#$eclipse_home-} |
This file contains hidden or 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
// ==UserScript== | |
// @name Gmail Ads Blocker | |
// @namespace org.kaorimatz | |
// @include http*://mail.google.com/* | |
// @version 0.0.1 | |
// ==/UserScript== | |
// right ads | |
GM_addStyle(".Bu { display:none; }"); | |
GM_addStyle(".Bu:first-child { display:block; }"); |