v8 의 Make
를 분석해 보자.
어떤 기술을 응용해 무언가를 만들고자 할 때, 필요한 것 중 하나는 그 기술이 어떻게 구성되어 있는지 확인하는 것. 각각의 구성품들을 살펴보며, 새로운 아이디어를 얻을 수 있다.(레고)
오픈소스의 구성품들은 Makefile
에 모두 기술되어 있다.
############################################################# | |
# # | |
# Generic Makefile for C++ projects # | |
# Author: Gabriel <[email protected]> # | |
# Date: 2014-04-18 # | |
# Version: 1.0 # | |
# # | |
############################################################# | |
#!/bin/bash | |
#### This script is published by Philipp Klaus <[email protected]> | |
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/> | |
#### It is originally by freese60 and modified by limemonkey. | |
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0> | |
### Uncomment this line to debug the script: | |
#set -x |
When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:
var Article = require('../../../models/article');
Those suck for maintenance and they're ugly.
I've been wanting to do a serious project in Go. One thing holding me back has been a my working environment. As a huge PyCharm user, I was hoping the Go IDE plugin for IntelliJ IDEA would fit my needs. However, it never felt quite right. After a previous experiment a few years ago using Vim, I knew how powerful it could be if I put in the time to make it so. Luckily there are plugins for almost anything you need to do with Go or what you would expect form and IDE. While this is no where near comprehensive, it will get you writing code, building and testing with the power you would expect from Vim.
I'm assuming you're coming with a clean slate. For me this was OSX so I used MacVim. There is nothing in my config files that assumes this is the case.
var Node = { | |
child: require('child_process'), | |
fs: require('fs'), | |
path: require('path') | |
}; | |
// This will be removed and then created and then removed: | |
var testdirectory = 'testfswatchmisses'; | |
if (Node.fs.remove !== undefined) throw new Error('fs.remove exists'); |
int offset = computeVerticalScrollOffset(); | |
int range = computeVerticalScrollRange(); | |
int extent = computeVerticalScrollExtent(); | |
int leftoverExtent = range - offset - extent; | |
// In Case Items does not fill the screen (More accurate, if last | |
// Item is reachable from offset 0 | |
boolean isfillingScreen = getBottom() - height +yDelta< getHeight(); | |
// added line |
/* | |
* Copyright (C) 2013 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |