var config = require(__dirname + '/kernel/config.js');
app.config = config;
app.get('/', controllers.index(app).index);
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($) { | |
| $(function() { | |
| var hash = window.location.hash.substr(1); | |
| var href = $('#nav li a').each(function(){ | |
| var href = $(this).attr('href'); | |
| if(hash==href.substr(0,href.length-5)){ | |
| var toLoad = hash+'.html #content'; | |
| $('#content').load(toLoad) | |
| } |
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
| var net = require('net'); | |
| var client = net.connect(5891, function() { | |
| console.log('Connected to server'); | |
| }); | |
| client.on('data', function(data) { | |
| var command = JSON.parse(new Buffer(data).toString()); | |
| switch(command.name) { |
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
| { | |
| "color_scheme": "Packages/Color Scheme - Default/Monokai Bright.tmTheme", | |
| "font_face": "Monaco", | |
| "font_size": 12, | |
| "fallback_encoding": "UTF-8", | |
| "trim_trailing_white_space_on_save": true, | |
| "highlight_line": true, | |
| "spell_check": false |
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
| www () { | |
| local root | |
| if [ $1 ]; then | |
| path="/Users/[USER]/Desktop/htdocs/$1" | |
| if [ -d "$path" ]; then | |
| root=$path | |
| else | |
| root=$1 |
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
| <style type="text/css"> | |
| body { | |
| margin: 10px; | |
| } | |
| .tips { | |
| border: 1px solid #000; | |
| padding: 5px; | |
| -webkit-border-radius: 5px; |
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
| <style type="text/css"> | |
| img:hover { | |
| -webkit-animation-name: tp1; | |
| -webkit-animation-duration: 1.9555s; | |
| -webkit-animation-iteration-count: infinite; | |
| cursor: pointer; | |
| } | |
| img { | |
| display: block; | |
| } |
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
| <?php | |
| interface Person { | |
| public function name(); | |
| public function gender(); | |
| } | |
| class Tom implements Person { | |
| // Must!! | |
| public function name() { /* do something... */ } | |
| public function gender() { /* do something... */ } |
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
| RewriteEngine On | |
| # Some hosts may require you to use the `RewriteBase` directive. | |
| # If you need to use the `RewriteBase` directive, it should be the | |
| # absolute physical path to the directory that contains this htaccess file. | |
| # | |
| # RewriteBase / | |
| RewriteCond %{REQUEST_FILENAME} !-f | |
| RewriteRule ^(.*)$ index.php [QSA,L] |
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
| portsnap update | |
| OR | |
| cvsup -L 2 -h cvsup.tw.FreeBSD.org /usr/share/examples/cvsup/ports-supfile | |
| ** Update only not upgrade |