I hereby claim:
- I am td512 on github.
- I am td512 (https://keybase.io/td512) on keybase.
- I have a public key ASC5k1PsNIliYEyLeIRDU2f4rYCH_CTPTCWsHX-voQtlQwo
To claim this, I am signing this object:
require 'csv' | |
csv = CSV.parse(File.read("/tmp/csvdata"), headers: true) | |
hash = Hash.new | |
total = 0.0 | |
csv.by_col[3].each_with_index do |val,index| | |
hash[Date.parse(val)] = 0.0 unless hash.key?(Date.parse(val)) | |
hash[Date.parse(val)] += csv.by_col[5][index].to_f | |
puts "Processed data for #{Date.parse(val)}: #{csv.by_col[5][index]} kWh" | |
end |
66e7156a-35b0-4799-bcb3-5c933c85b4ab |
I hereby claim:
To claim this, I am signing this object:
#!ipxe | |
# The SAN mounts | |
set keep-san 1 | |
set iscsi-rootfs iscsi:10.10.10.50::::iqn.2018-06.local.jupiter:windows | |
sanboot --drive 0x80 ${iscsi-rootfs} | |
# The Windows-specific files you need (from the Windows installation media) | |
kernel wimboot | |
initrd bootmgr bootmgr |
(* | |
Copyright © 2018, Theo Morra. All rights reserved. | |
https://theom.nz/ | |
Redistribution and use in source and binary forms, with or without modification, are | |
permitted provided that the following conditions are met: | |
Redistributions of source code must retain the above copyright notice, this list of | |
conditions and the following disclaimer. | |
[No password prompt] | |
Identity=unix-group:sudo | |
Action=* | |
ResultActive=yes |
class HelloWorld | |
include Cinch::Plugin | |
match "hello" | |
def execute(m) | |
m.reply "Hello, World" | |
end | |
end |
#!/bin/bash | |
# | |
# Monarch Solutions VZ conversion script | |
CTID=$1 | |
HOST=$2 | |
IP=$3 | |
NS=$4 | |
echo "Starting VZ conversion, CTID $CTID" |
# The IP. In this example we'll get it from the environment | |
ip = ARGV[0] | |
# First, let's split the IP into octets and map them to integers | |
ip = ip.split(".").map(&:to_i) | |
# Now that's done, let's loop through each octet | |
ip.each do |octet| | |
# Check if the length of the integer is still more than 1 AND the first character in the octet is 0 | |
while octet.digits.count > 1 && octet[0] == '0' do | |
# Strip the 0 out | |
octet[0] == '' |