###Finder
Keys:
Desc | Key |
---|---|
Move here | Option+CMD+V |
Commands:
html { | |
z-index: 0; | |
filter: grayscale(100%); | |
-webkit-filter: grayscale(100%); | |
-moz-filter: grayscale(100%); | |
-ms-filter: grayscale(100%); | |
-o-filter: grayscale(100%); | |
filter: url("data:image/svg+xml;utf8,<svg xmlns=\'http://www.w3.org/2000/svg\'><filter ….3333 0 0 0.3333 0.3333 0.3333 0 0 0 0 0 1 0\'/></filter></svg>#grayscale"); | |
filter: progid:DXImageTransform.Microsoft.BasicImage(grayscale=1); | |
-webkit-filter: grayscale(1); |
//get file from Mongo Grid file system. | |
GridFSDBFile file = fileService.getFile(fileId); | |
//将图片文件转换成一个BufferedImage对象 | |
BufferedImage image = ImageIO.read(file.getInputStream()); | |
//执行对应的操作 | |
BufferedImage thumbnail = Scalr.resize(image, 150); | |
//获取文件的格式 |
#!/bin/bash | |
#checkHosts.sh | |
#author rankun203@gmail.com | |
function success { | |
echo "isok $1 $2" | |
echo "$1 $2" >> ./hosts.ok | |
} |
/** | |
* Created on 14-6-15 | |
* | |
* output: | |
* 2.787433034459691 Miles | |
* 4.485938629409498 Kilometers | |
* 2.4206068471247955 Nautical Miles | |
* | |
* Original post by dommer on StackOverflow: http://stackoverflow.com/a/3694410/1904043 | |
* |
import java.util.Arrays; | |
/** | |
* Created on 14-6-18 | |
* output: | |
50058:49942 | |
So, get0or1 works fine. | |
[12674, 12405, 12604, 12519, 12321, 12520, 12528, 12429] | |
* @author rankun203@gmail.com | |
*/ |
#!/bin/bash | |
#author rankun203@gmail.com | |
#ref http://unix.stackexchange.com/a/24955 | |
cd /home/rankun203 | |
inotifywait -r -m ./www -e create -e moved_to | | |
while read path action file; do | |
echo "The file '$file' appeared in directory '$path' via '$action'" | |
rsync -avzrhu --update --progress --chmod=u+rwx,g+rwx,o+rwx "$path$file" rankun203@s.rankun.org:/home/rankun203/html/files | |
done |
#include <stdio.h> | |
#include <conio.h> | |
/** | |
* author: rankun203@gmail.com | |
* Usage: | |
* -With Parameter | |
* CMD: charascii.exe A | |
* OutPut: A: 65 | |
* -Without Parameter |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
###Finder
Keys:
Desc | Key |
---|---|
Move here | Option+CMD+V |
Commands:
if(parent.frames.length == 0) { | |
// AW: always be inside a Colnect page | |
var dst = location.href.replace(/\/forums/, '/forum').replace(/\.php[\?]?/, '!'); | |
top.location.replace(dst); | |
} else { | |
try { | |
url = parent.location.href; | |
pos = url.search(/\/\w\w(\W|$)/); | |
lang = url.substring(pos+1,pos+3); | |
dst = location.href.replace(/\/forums/, '/'+lang+'/forum').replace(/\.php[\?]?/, '!').replace(/lang=\w\w&?/, ''); |