I hereby claim:
- I am vstone on github.
- I am vstone (https://keybase.io/vstone) on keybase.
- I have a public key ASCF9MBdc4aceHSGtMwqgiPx42QaaXu9Ge0GQZDfJgTLZQo
To claim this, I am signing this object:
# frozen_string_literal: true | |
# File goes into lib/puppet/functions/ of some module | |
# You can use this function to dynamically calculate memory use for a certain process. | |
# The java JVM for example. | |
# | |
# Its possible to calculate memory based upon fixed numbers (would like 512M but with a minimum of 256M) or | |
# with percentages (give me half but with a minimum of 256M). | |
# |
#!/bin/bash -e | |
errr() { | |
echo "$@" 1>&2 | |
exit 1; | |
} | |
( | |
cd linux/ |
#!/bin/bash | |
# requirements: | |
# - curl | |
# - nokogiri | |
# usage: fill in username and password here, execute, and it spits out json array with your usage | |
username=<< Fill your username in here >> | |
password=<< Fill your password in here >> |
$ puppet apply --modulepath=. -e 'include test' | |
Warning: ModuleLoader: module 'test' has unresolved dependencies - it will only see those that are resolved. Use 'puppet module list --tree' to see information about modules | |
(file & line not available) | |
Error: Evaluation Error: Error while evaluating a Function Call, can't modify frozen String at /home/jan/tmp/test/manifests/init.pp:4:16 on node minimoose.home.vstone.be |
module Puppet::Parser::Functions | |
newfunction(:calculate_memory_use, :type => :rvalue, :doc => <<-'ENDHEREDOC') do |args| | |
calculate_memory_use(use, reserved, minimum=0) | |
[*use*] How much memory should I use (of the non-reserved space left) | |
* Floating numbers smaller than 1 are interpreted as percentage. | |
* Anything else is used as size. |
require 'yaml' | |
module RSpecHelper | |
module SystemFacter | |
def self.resolve_fact (fact, stubs = {}, facter_path = (ENV['FACTER_PATH'] || '/usr/bin/facter')) | |
env_values = {} | |
command = [ facter_path, '--yaml'] | |
facts_path = File.expand_path(File.dirname(__FILE__) + '/../../lib/facter') |
I hereby claim:
To claim this, I am signing this object:
/*** BEGIN META { | |
"name": "List GIT Branches", | |
"comment": "You can use this to fill up a dynamic list parameter with branches. Optionally, you can filter the branches to show.", | |
"parameters": [ 'FILTER', 'REMOTE' ], | |
"core": "1.580", | |
"authors": [ | |
{ name : "Jan Vansteenkiste" } | |
] | |
} END META**/ |
#!/bin/bash | |
( echo 'VM|Status|IP|Memory|OS'; | |
for node in `lxc-ls -1`; do | |
tmpfile=`mktemp -t lxc-info-$node-XXXXXXX`; | |
lxc-info -n $node | sed 's@[ ]*:[ ]*@:@' > $tmpfile | |
status=$( cat $tmpfile | grep 'State:' | awk -F: '{print $2}' ); | |
ip=""; mem=""; os=""; osver=""; | |
if [ "$status" == "RUNNING" ]; then |