This file contains 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
ps aux | tail -n+2 | sort -rk 3,4 | awk 'NR <= 5 { cpu=$3; pid=$2; $1=$2=$3=$4=$5=$6=$7=$8=$9=$10=""; printf("CPU:%-.1f \tPID:%5d : %s\n", cpu, pid, $0); }' |
This file contains 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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>hello</title> | |
<style> | |
span.hex { | |
display: none; | |
} | |
span.char { | |
display: block; |
This file contains 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/bash | |
PURPLE=$(tput setaf 13) | |
RED=$(tput setaf 1) | |
CYAN=$(tput setaf 14) | |
YELLOW=$(tput setaf 11) | |
GREEN=$(tput setaf 2) | |
NONE=$(tput sgr0) | |
ERASE="`tput cuu1``tput el`" | |
if [ -z "$1" ]; then | |
echo "Usage: $(basename $0) [source movie file]" |
This file contains 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
/** | |
* input: #hogehogehogehoge output: "hogehogehogehoge" | |
* input: #one/two/three output: "one/two/three" | |
* input: #a=1&b=2&c=hello+me output: {a:1, b:2, c:"hello me"} | |
* input: #a&b=2&c=hello?+me output: {a:true, b:2, c:"hello? me"} | |
* input: #a&b=2=3=4=5 output: {a:true, b:[2,3,4,5]} | |
* | |
* @return {string|object} | |
*/ | |
function fragment_decode() { |
This file contains 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
javascript:var last_url='';var l = document.getElementsByTagName('div');var cnt = 0;for (var i = 0; i < l.length; ++i) { var s = l[i].getAttribute('style');if ('string'!== typeof s || !s) {continue;}s = s.replace(/\s+/g, '').toLowerCase(); if ((-1<s.indexOf('opacity:1;') ||-1<s.indexOf('z-index:0;'))&&s.match(/height:[0-9]+/g)&&s.match(/width:[0-9]+/g)) { var im = l[i].getElementsByTagName('img'); if (im && im.length) { for (var j = 0; j < im.length; ++j) {var u='https:' + im[j].getAttribute('src');if(u && 'string'===typeof u && u.indexOf('gstatic.com')==-1 && (u.indexOf('.jpg')>-1 || u.indexOf('.png'>-1))){u = u.replace(/w[0-9]+\-h[0-9]+/g,'w9999-h9999');if(u!=last_url){window.open(u,'img_window');last_url = u;++cnt;}} } } }}if(!cnt) {alert('SORRY');} |
This file contains 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
"use strict"; | |
function get_args(arguments_) { | |
/* http://stackoverflow.com/questions/1007981/how-to-get-function-parameter-names-values-dynamically-from-javascript */ | |
var STRIP_COMMENTS = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg; | |
var ARGUMENT_NAMES = /([^\s,]+)/g; | |
var src = arguments_.callee.toString().replace(STRIP_COMMENTS, ''); | |
var pars = src.slice(src.indexOf('(')+1, src.indexOf(')')).match(ARGUMENT_NAMES); | |
if (! pars) { pars = []; } | |
var i, j; |
This file contains 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
javascript:var s = document.getElementsByClassName("media-image")[0].src, v = function (p) { window.open(p.replace(/(:large$)/, ":orig")) };if (s) { v(s) } else { s =document.getElementsByClassName("media-img")[0].src; if (s) { v(s) } else { alert( "no image") }} |
This file contains 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
javascript:var s = document.getElementsByClassName("media-image")[0].src, v = function (p) { window.open(p.replace(/(:large$)/, ":orig")) };if (s) { v(s) } else { s =document.getElementsByClassName("media-img")[0].src; if (s) { v(s) } else { alert( "no image") }} |
This file contains 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
<!-- | |
HOW TO USE: | |
0. https://github.com/vaadin/sass-compiler からソースを取得する | |
get vaadin sass compiler from above | |
1. このファイルで pom.xml を上書きする | |
overwrite pom.xml with this file | |
2. ビルドする $ mvn package | |
build | |
3. 出来上がり $ java -jar target/vaadin-sass-compiler-1.0.0-SNAPSHOT-jar-with-dependencies.jar | |
done! |
This file contains 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
javascript: var re = /^(.*?)(:[a-z]+)?$/; | |
[].forEach.call(document.getElementsByClassName("media-img"), function(e) { | |
var orig = (e.src ? e.src : "").replace(re, "$1:orig"); | |
window.open(orig); | |
}); | |
var dlg = document.getElementsByClassName("permalink-container"); | |
if (dlg.length) { | |
[].forEach.call(dlg[0].getElementsByClassName("AdaptiveMedia-photoContainer"), function(div) { | |
[].forEach.call(div.getElementsByTagName("img"), function(img) { | |
var orig = (img.src ? img.src : "").replace(re, "$1:orig"); |
OlderNewer