This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Based on https://gist.github.com/halmartin/28e013a9034be04777073bccc918cb95 (python) | |
// And uses Crc32 and Base32 from other github code | |
// Code should run on .NET Framework 4.7+ | |
using System.Security.Cryptography; | |
// The 3 constants is byte definitions inside the library mentioned in the original code | |
// These should be HEX encoded to strings without leading 0x, i.e. "0d0a" etc. | |
const string AES_IV = "";// This is one of the values you need to dig out of the library; | |
const string HMAC_KEY = "";// This is one of the values you need to dig out of the library | |
const string HMAC_MSG_RAW = "";// This is one of the values you need to dig out of the library |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Connect to console on switch via console cable | |
Log in with admin/admin unless you changed the default username/password | |
Type 'enable' hit <enter> | |
Type 'conf t' hit <enter> | |
Type 'fae mlxi2c set_fan /MGMT/FAN1 1 25' hit <enter> | |
This will set fan speed to 25% and not make such noise |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# ESXi script to auto start virtual machine that exports NFS shares to ESXi, i.e. FreeNAS/TrueNAS/whatever | |
VMNAME=TrueNAS | |
SHARE=TrueNAS | |
MAXLOOPSVM=10 | |
MAXLOOPSSHARE=10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Installed a new FreeNAS and I wanted to apply my usual 10Gbit network tunables. | |
It turns out it matters a lot in which order you apply them - if you apply them in the wrong order your | |
system stops responding and loses network capabilities. | |
I added net.inet.tcp.sendspace with a value of 4194304 and seconds after my system stopped responding and when logging onto the console | |
- I got messages from all network usage no buffer space available | |
So I looked at the tunables I added with sysctl -a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can end up in a situation where Azure DevOps for one pipeline refuses to restore packages | |
and for another that references same packages it just works. | |
I am guessing there is a bug in Microsofts code somewhere. | |
This can me remedied by adding a default nuget.config to the roaming app data directory for the user that is running the build agents. | |
i.e. I have an agent running with the username tfsbuildagent | |
I have created a nuget.config in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add these lines to the file /etc/sysctl.conf | |
#10GBE tuning | |
kern.ipc.soacceptqueue=2048 | |
kern.ipc.somaxconn=2048 | |
kern.ipc.maxsockbuf=33554432 | |
net.inet.tcp.recvbuf_inc=2097152 # (default 16384) | |
net.inet.tcp.recvbuf_max=16777216 # (default 2097152) | |
net.inet.tcp.recvspace=4194304 # (default 65536) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When creating VIC server with pasted in certs from vsphere it get garbled somehow, | |
causing the server not to be able to start the admiral service on the vic server | |
with an error similar to: | |
start_admiral.sh[8031]: Exception in thread "main" java.lang.RuntimeException: Failed to read PKCS#8 PEM file. file=/configs/server.key | |
So ssh to the vic server and fix the certs. | |
when connected: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vSphere Integrated Containers | |
* requires that firewall on esxi hosts are updated with the following firewall rule, | |
otherwise the containerhosts (vch) cannot communicate properly with the vic host | |
<!-- vSphere Integrated Containers Engine to allow outbound 2377/cp --> | |
<service id='0044'> | |
<id>vic-engine</id> | |
<rule id='0000'> | |
<direction>outbound</direction> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo "Total size in bytes of all vmdk" | |
stat *flat.vmdk|grep Size|cut -d ' ' -f 5|awk '{ SUM += $1} END { print SUM*512 }' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#install mbuffer | |
apt-get install mbuffer | |
#on receiver side start | |
mbuffer -s 128k -m 4G -4 -I 9090 | zfs receive -F tank/esxi | |
#on sender side: |
NewerOlder