added shell directory with shell files

This commit is contained in:
coderaiser 2012-12-05 10:25:33 -05:00
parent 48e3a20bb8
commit e56fa13546
11 changed files with 110 additions and 34 deletions

12
shell/c9kill.sh Executable file
View file

@ -0,0 +1,12 @@
kill -9 `ps ax|grep node-openshift|grep -v grep|awk '{print $1}'`
# print finded process
ProcessList=`ps ax|grep node-openshift`
echo $ProcessList
# getting pid of process
PID=`echo "${ProcessList}"|grep -v grep|awk '{print $1}'`
echo $PID
#kill it
if test ! $PID
then echo 'process not found'
else kill -9 $PID && echo 'killed process'
fi

9
shell/cloudcmd.bat Normal file
View file

@ -0,0 +1,9 @@
:: -------------------------------------
:: Changing charset back to 866, because
:: all win32 default commands, that work
:: thru cmd.exe showing out in unicode
:: charset. So Cloud Commander changes
:: 866 charset to Unicode 65001 sometime
:: when it's neaded.
:: -------------------------------------
node ../cloudcmd || chcp 866

10
shell/deploy.sh Executable file
View file

@ -0,0 +1,10 @@
echo 'appfog'
af update
echo 'http://cloudcmd.aws.af.cm/'
echo 'cloud foundry'
vmc update
echo 'http://cloudcmd.cloudfoundry.com/'
echo 'nodester'
git push nodester master
echo 'heroku'
git push heroku master

6
shell/install-dev Normal file
View file

@ -0,0 +1,6 @@
git checkout dev
cd node_modules
git clone git://github.com/coderaiser/minify
cd minify
git checkout dev
cd ../../

17
shell/kill.js Normal file
View file

@ -0,0 +1,17 @@
/* c9.io kill active node process */
(function(){
"use strict";
var exec = require('child_process').exec,
lCmd = 'kill -9' + ' ' + /* kill finded process */
'`ps ax' + '|' + /* show all process */
'grep node-openshift' + '|' + /* find node-openshift */
'grep -v grep' + '|' + /* exlude grep command */
'awk "{print $1}"`'; /* show first collumn */
exec(lCmd, function(error, stdout, stderr){
console.log(error || stdout || stderr);
});
})();

13
shell/secret.bat Normal file
View file

@ -0,0 +1,13 @@
#
# part of Cloud Commander
# win32 version
# secrets of github and dropbox
# must not be shared
# http://github.com/coderaiser/cloudcmd
#
# for using just add %-symbol on start and end of name
# like %github_secret%
github_secret=e21b3724d84f0f7570d2d04d8e055f3cc3be3071
dropbox_key=0nd3ssnp5fp7tqs
dropbox_chooser_key=o7d6llji052vijk

13
shell/secret.sh Normal file
View file

@ -0,0 +1,13 @@
#
# part of Cloud Commander
# *nix version
# secrets of github and dropbox
# must not be shared
# http://github.com/coderaiser/cloudcmd
#
# for using just add $-symbol on start of name
# like $github_secret
export github_secret=e21b3724d84f0f7570d2d04d8e055f3cc3be3071
export dropbox_key=0nd3ssnp5fp7tqs
export dropbox_chooser_key=o7d6llji052vijk