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:
const Article = require('../../../../app/models/article');
Those suck for maintenance and they're ugly.
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
#!/bin/sh | |
if [ $(ps aux | grep $USER | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ] | |
then | |
export PATH=/usr/local/bin:$PATH | |
export NODE_ENV=production | |
cd /path/to/app && forever --spinSleepTime 10000 start server.js >> forever.log 2>&1 | |
fi |
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
# place this file in ~/.config/terminator/config | |
[global_config] | |
title_transmit_bg_color = "#d30102" | |
focus = system | |
[keybindings] | |
reset_clear = <Ctrl>R | |
new_tab = <Ctrl>T | |
split_horiz = <Ctrl><Shift>E | |
split_vert = <Ctrl>E | |
close_term = <Ctrl><Shift>W |
In August 2007 a hacker found a way to expose the PHP source code on facebook.com. He retrieved two files and then emailed them to me, and I wrote about the issue:
http://techcrunch.com/2007/08/11/facebook-source-code-leaked/
It became a big deal:
http://www.techmeme.com/070812/p1#a070812p1
The two files are index.php (the homepage) and search.php (the search page)
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
Simple blinking cursor... code from http://xip.io/ ... Ofcourse I don't own the code! Just keeping it here as a reference of the CSS3 code used. |
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
// MIXINS | |
vendor(prop, args) | |
-webkit-{prop} args | |
-moz-{prop} args | |
-o-{prop} args | |
{prop} args | |
animation() | |
vendor('animation', arguments) |
NewerOlder