redirect port 80 to 3000
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
use forever
forever start --minUptime 1000 --spinSleepTime 1000 ./bin/www
// Live markdown preview w/ jquery and marked.js | |
// https://github.com/chjj/marked | |
// HTML: | |
//<textarea rows=5 id="input"></textarea> | |
//<div id="output"></div> | |
$(document).ready(function () { | |
$("#input").keyup(function () { | |
var text = $(this).val(); |
create a branch | |
git checkout -b iss53 | |
update a branch to master | |
$ git checkout jcpst | |
$ git merge master | |
redirect port 80 to 3000
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3000
use forever
forever start --minUptime 1000 --spinSleepTime 1000 ./bin/www
for i in *.mp3; do lame --decode "$i"; done |
When you have this error: | |
Error launching web browser | |
GLib.GException: There was an error launching the default action command associated with this location. at Gnome.Url.Show (System.String url) [0x00000] in :0 at MonoDevelop.Platform.GnomePlatform.ShowUrl (System.String url) [0x00000] in /build/src/monodevelop-2.8.5/src/addins/GnomePlatform/GnomePlatform.cs:134 at MonoDevelop.Ide.DesktopService.ShowUrl (System.String url) [0x00000] in /build/src/monodevelop-2.8.5/src/core/MonoDevelop.Ide/MonoDevelop.Ide/DesktopService.cs:84 at MonoDevelop.AspNet.Gui.BrowserLauncher.LaunchDefaultBrowser (System.String url) [0x00000] in /build/src/monodevelop-2.8.5/src/addins/AspNet/MonoDevelop.AspNet/MonoDevelop.AspNet.Gui/BrowserLauncher.cs:42 | |
this command can help: | |
gconftool-2 --set --type=string /desktop/gnome/url-handlers/http/command '/usr/bin/firefox %s' | |
path to browser may need to be changed. |
Find the preference file
(workspace/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.springsource.ide.eclipse.dashboard.ui.prefs)
And manually add (or change) the line:
org.springsource.ide.eclipse.dashboard.uidashboard.startup=false
from here: http://www.linuxjournal.com/content/downloading-entire-web-site-wget
wget --recursive --no-clobber --page-requisites --html-extension --convert-links --restrict-file-names=windows --domains website.org --no-parent www.website.org/tutorials/html/
from here
Whoops, didn't want to commit that...
Leave tracked files untouched (use --hard
to remove all tracked changes):
git reset --soft HEAD~1
If you already pushed, add a new commit that reverts the last commit:
# from here: http://sixarm.com/about/git-how-to-find-git-repository-directories.html | |
find ~ -type d -name .git | xargs -n 1 dirname |
#from here: http://stackoverflow.com/questions/24710521/calculating-average-value-of-temp-from-lm-sensors-using-bash-script | |
sensors | awk '/^Core /{++r; gsub(/[^[:digit:]]+/, "", $3); s+=$3} END{print s/(10*r) "°C"}' |