- Debian, minial installation disk, english layout, Germany, no meta package.
- su -
apt-get update && apt-get upgrade
apt-get install sudo
adduser $USERNAME sudo
exit
sudo apt-get install build-essential git zsh mc xorg i3 tmux
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(){ | |
var colors = [ | |
"#F0F0F0", "#AAAAAA", "#888888", "#333333", | |
"#B00B1E", "#003366", "#00BB33", "#00FF00" | |
]; | |
$('#zh-question-answer-wrap .voters a').each(function(){ | |
var self = $(this); | |
$.get("http://www.zhihu.com/node/MemberProfileCardV2?params=" + | |
encodeURIComponent('{"url_token":"' + | |
self.attr('data-tip').split("$")[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
import javafx.application.Application; | |
import javafx.collections.*; | |
import javafx.geometry.Pos; | |
import javafx.scene.*; | |
import javafx.scene.chart.*; | |
import javafx.scene.chart.XYChart; | |
import javafx.scene.control.*; | |
import javafx.scene.layout.*; | |
import javafx.scene.shape.Line; | |
import javafx.stage.Stage; |
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
@keyframes shake { | |
0% {transform: translateX(0);} | |
12.5% {transform: translateX(-6px) rotateY(-5deg)} | |
37.5% {transform: translateX(5px) rotateY(4deg)} | |
62.5% {transform: translateX(-3px) rotateY(-2deg)} | |
87.5% {transform: translateX(2px) rotateY(1deg)} | |
100% {transform: translateX(0)} | |
} | |
.shake { |
I hereby claim:
- I am metaphox on github.
- I am metaphox (https://keybase.io/metaphox) on keybase.
- I have a public key whose fingerprint is E00C 8C03 2EA9 C578 6609 299F 3A7C 046C 3455 786F
To claim this, I am signing this object:
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 convertToChinese(num) { | |
num=''+num; | |
var ret='', ret2='', zero=''; | |
var nWord=['零','一','二','三','四','五','六','七','八','九','十']; | |
var unitWord=['','十','百','千'], unitWord2=['','萬','億','兆']; | |
var rWord=[[/^一十/, '十']]; | |
var n=num.replace(/\D/g,'').split(''); | |
for(var i=0;i<n.length;i++) { | |
if(Math.floor((n.length-i-1)/4)>=unitWord2.length) { | |
ret2+= nWord[n[i]]; |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout. This is also called reflow or layout thrashing, and is common performance bottleneck.
elem.offsetLeft
,elem.offsetTop
,elem.offsetWidth
,elem.offsetHeight
,elem.offsetParent
elem.clientLeft
,elem.clientTop
,elem.clientWidth
,elem.clientHeight
elem.getClientRects()
,elem.getBoundingClientRect()
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
timers = []; | |
var cycleImgs = function(imgs){ | |
for(var j=0;j<timers.length;j++){clearTimeout(timers[j]);} | |
var selector = '#bgimg'; | |
var gonext = function(imgarray, idx){ | |
//console.log(imgarray[idx]); | |
var nextImage = new Image(); | |
nextImage.onload = function(){ | |
$(selector).stop().animate({opacity : 0 }, | |
250, |
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 entry(metadata) | |
local postname = '_posts/' .. metadata.ref .. '.lua' | |
local pubdate = os.date("*t", metadata.pubdate) | |
print('Processing ' .. postname) | |
local convertedname = '_posts/' .. pubdate.year .. '-' | |
.. pubdate.month .. '-' | |
.. pubdate.day .. '-' | |
.. metadata.ref .. '.html' | |
print('Converting file into ' .. convertedname) | |
local f = assert(io.open(convertedname, 'w')) |
OlderNewer