position the element vertical center with pure CSS skill from Front-End Developer Taiwan Group
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
request('http://thehackernews.com/', function(error, response, html) { | |
if (!error && response.statusCode == 200) { | |
var $ = cheerio.load(html); | |
var parseResult = []; | |
$(".post").each(function(i, element) { | |
var title = $(this).find("h1").text(); | |
var date = $(this).find("span.dtstamp.author").attr("title"); |
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
function compareNumbers(x, y) { | |
return x-y; | |
} | |
var numbers = [1,4,3,2]; | |
numbers.sort(compareNumbers); |
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
Show hidden characters
{ | |
"Seti_pad_5": true, | |
"Seti_tabs_med": true, | |
"auto_upgrade_ignore": | |
[ | |
"Seti_UI" | |
], | |
"caret_extra_width": 0, | |
"color_scheme": "Packages/JavaScriptNext - ES6 Syntax/Monokai Phoenix.tmTheme", | |
"fade_fold_buttons": false, |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Seti_Monokai</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
# $Id: screen-keys.conf,v 1.7 2010-07-31 11:39:13 nicm Exp $ | |
# | |
# By Nicholas Marriott. Public domain. | |
# | |
# This configuration file binds many of the common GNU screen key bindings to | |
# appropriate tmux key bindings. Note that for some key bindings there is no | |
# tmux analogue and also that this set omits binding some commands available in | |
# tmux but not in screen. | |
# | |
# Note this is only a selection of key bindings and they are in addition to the |
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
# put this in your .bash_profile | |
if [ $ITERM_SESSION_ID ]; then | |
export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
fi | |
########################### | |
# ~/.zshrc | |
precmd() { | |
# sets the tab title to current dir |
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
function product() { | |
var args = Array.prototype.slice.call(arguments); // makes array from arguments | |
return args.reduce(function tl (accumulator, value) { | |
var tmp = []; | |
accumulator.forEach(function (a0) { | |
value.forEach(function (a1) { | |
tmp.push(a0.concat(a1)); | |
}); | |
}); | |
return tmp; |
- Deadline: 10/12 中午 12:00
- 把檔案寄至 chentsulin@gmail.com,標題寫 [作業二/ 電機X XXX] (如果你已經會用 github 也可以寄 repo 連結過來)
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
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash # update to nvm@0.32.1 | |
nvm install stable # v8.9.2 is LTS | |
nvm alias default stable # default -> stable (-> v8.9.2) |
OlderNewer