Alias for git is configured into the file .git/config
:
[alias]
publish = !sh ./scripts/publish.sh
The script file ./scripts/publish.sh
looks like this:
#!/bin/sh
set -e
Alias for git is configured into the file .git/config
:
[alias]
publish = !sh ./scripts/publish.sh
The script file ./scripts/publish.sh
looks like this:
#!/bin/sh
set -e
<html> | |
<head> | |
<title>Hello World</title> | |
</head> | |
<body> | |
<h1>Hello World</h1> | |
<p>This is content for development test tool.</p> | |
</body> | |
</html> |
This script only prints the commands needed to uninitialize a iSCSI target in OpenSolaris based OS.
Run it like ./unsharedataset.sh storage/iscsi/nor-atlas
:
+ test -n storage/iscsi/nor-atlas
+ test -n 600144F06FD5CE0000004DC06C000003
+ test -n iqn.1986-03.com.sun:02:55514a4d-a70c-c4ae-a26d-f9a7a665e8ef
+ test xiqn.1986-03.com.sun:02:55514a4d-a70c-c4ae-a26d-f9a7a665e8ef != x-
----
## JavaScript | |
## | |
syntax "JS" "\.js$" "\.sjs$" | |
# Reserved Keywords | |
color yellow "\b(instanceof|typeof|break|do|new|var|case|else|return|void|catch|finally|continue|for|switch|while|this|with|debugger|function|throw|default|if|try|delete|in)\b" | |
# Future Reserved Words | |
color brightblue "\b(class|enum|extends|super|import|const|export|implements|let|private|public|yield|static|interface|package|protected)\b" |
My nanorc settings.
Save js.nanorc
to /opt/nano/js.nanorc
etc.
Then use it with:
include "/opt/nano/js.nanorc"
Sample ~/.nanorc
is in file nanorc
.
var express = require('express'); | |
var app = module.exports = express.createServer(); | |
var io = require('socket.io').listen(app); | |
io.configure('development', function(){ | |
io.set('log level', 1); | |
io.set('transports', ['xhr-polling', 'websocket']); | |
}); | |
io.configure('production', function(){ |
/* Run SQL query group */ | |
var move_player = sql.group( | |
sql.query(['next_number'], 'SELECT MAX(number)+1 AS number FROM reg WHERE game_id=:game_id'), | |
sql.query(['old_user_id'], 'SELECT user_id FROM reg WHERE number=:old_number AND game_id=:game_id'), | |
sql.query(['new_user_id', 'new_reg_id'], 'SELECT user_id, reg_id FROM reg WHERE number=:new_number AND game_id=:game_id'), | |
sql.query('DELETE FROM player WHERE reg_id=:new_reg_id AND game_id=:game_id LIMIT 1'), | |
sql.query('DELETE FROM reg WHERE reg_id=:new_reg_id AND game_id=:game_id LIMIT 1'), | |
sql.query('DELETE FROM auth WHERE user_id=:old_user_id AND game_id=:game_id LIMIT 1'), | |
sql.query('UPDATE reg SET user_id=:new_user_id WHERE user_id=:old_user_id AND game_id=:game_id'), | |
sql.query('UPDATE auth SET user_id=:new_user_id WHERE user_id=:old_user_id AND game_id=:game_id') |
First install all dependencies from older Freeciv client (packed with the official repo):
sudo apt-get build-dep freeciv-client-gtk
Then it's basically this:
wget http://downloads.sourceforge.net/project/freeciv/Freeciv%202.3/2.3.0/freeciv-2.3.0.tar.bz2
--- T40L20S40.txt 2011-09-29 23:00:22.000000000 +0300 | |
+++ T50L10S40.txt 2011-09-29 23:32:00.000000000 +0300 | |
@@ -7,9 +7,9 @@ Plymouth:Production+:2 | |
Plymouth:Production-:0 | |
Plymouth:Trade+:1 | |
Plymouth:Trade-:0 | |
-Plymouth:Gold:0 | |
+Plymouth:Gold:+1 | |
Plymouth:Lux:0 | |
-Plymouth:Science:1 |
This is how to run it:
$ node hello.js
Hello world