Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
_dir=/data/bitcoind
function install/packages() {
yum -y groupinstall "Development Tools"
yum -y install qt-devel protobuff-devel qrencode-devel git
}
function install/dirs() {
@hornos
hornos / smonitor
Created October 14, 2014 12:39
Slurm SGI UV monitor
#!/bin/bash
gbn=$(basename ${BASH_SOURCE})
gdn=$(dirname ${BASH_SOURCE})
rc="${HOME}/.${gbn}rc.$$"
function help/jobmon() {
cat <<EOF
Usage: smonitor -j JOBID
@hornos
hornos / runner.litcoffee
Created June 13, 2014 13:47
Quintus Runner
define (require, exports, module) ->
  'use strict'

  Q = window.Q = Quintus()
    .include("Sprites, Scenes, Input, 2D, Anim, Touch, UI")
    .setup( maximize: true )
    .controls().touch()

  SPRITE_BOX = 1
  Q.gravityY = 2000
@hornos
hornos / ldapsync.sh
Created June 5, 2014 11:24
ldapsync.sh
#!/bin/bash
config=/opt/nce/sbin/ldap/config
password=/opt/nce/sbin/ldap/password
if test -r ${config} ; then
source ${config}
else
echo "Not found: ${config}"
exit 1
@hornos
hornos / PageView.litcoffee
Created May 21, 2014 09:52
hogy ****** *** az összes fémöszös egyrakáson if u know what I mean
define (require, exports, module) ->
  View          = require 'famous/core/View'
  Surface       = require 'famous/core/Surface'
  Transform     = require 'famous/core/Transform'
  StateModifier = require 'famous/modifiers/StateModifier'
  HeaderFooter  = require 'famous/views/HeaderFooterLayout'

  View.DEFAULT_OPTIONS=
    headerSize: 44
@hornos
hornos / slurm_cluster_load
Created May 20, 2014 11:01
slurm cluster load
scontrol -o show nodes | awk '{print $1,$4,$6,$7}' | sed s/[a-zA-Z]*=//g | awk '{if($2 >0) print $1, $2 "/" $3, $4}'
@hornos
hornos / dircheck
Last active August 29, 2015 14:01
#!/bin/bash
_user=${1:-$USER}
_home="/home/${_user}"
_dir=$(readlink ${_home} || echo ${_home})
_stat=$(stat -c "%a %G %U %n" ${_dir})
_mode=$(echo ${_stat} | awk '{print $1}')
_sgroup=$(echo ${_stat} | awk '{print $2}')
_suser=$(echo ${_stat} | awk '{print $3}')
@hornos
hornos / gist:9892584
Created March 31, 2014 13:46
overload
gstat -i manager -a -1 | grep ^cn | awk '{print $11}' | sed s/\,// | awk 'BEGIN{sum=0;c=1}{sum+=$0;++c}END{print sum/c}'
@hornos
hornos / gist:9842874
Created March 28, 2014 20:59
Csókolom nénike, jó reggelt kívánok!
var tt = require('browserify-transform-tools/lib/transformTools.js');
options = {};
module.exports = tt.makeStringTransform("decsify",.
options, function(contents, transformOptions, done) {
done(null, contents.replace(/cs\!/g, "./")) });
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"