This file contains 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 | |
# source: https://forum.proxmox.com/threads/removing-deleting-a-created-cluster.18887/ | |
set -x | |
# stop service | |
systemctl stop pvestatd.service | |
systemctl stop pvedaemon.service | |
systemctl stop pve-cluster.service | |
systemctl stop corosync |
This file contains 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 | |
set -e | |
DEST="/path/to/dest" | |
SRCS="/path1 /usr/path2" | |
INCLUDES="" | |
for s in $SRCS; do |
This file contains 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 | |
MIN=5 | |
WARN=10 | |
BAT_TIME=$(sysctl -a |grep battery.time |awk -F ' ' '{print $2}') | |
test -f /tmp/battery.lock && exit 1 | |
touch /tmp/battery.lock |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#define MEM_SIZE_KBYTES 32 | |
#define MEM_SIZE (1024 * MEM_SIZE_KBYTES) | |
struct vehicle { | |
char serial[32]; | |
char name[32]; |
This file contains 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 | |
init_mirror="/dev/da3 /dev/da4" | |
mirrors="da5:da6 da7:da8 da9:da11 da12:da13 da14:da15" | |
zils="da2:da10" | |
zil_size="8g" | |
zfs_pool="tank" | |
out_file="/root/bonnie.csv" | |
bonnie_dir="/tank/bonnie" |
This file contains 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 | |
# | |
# reindex elastic search indizies | |
# | |
# might destroy everything, don't use. | |
RES=$(curl -s 'localhost:9200/_cat/indices' |awk -F ' ' '{print $3}') | |
echo $RES | |
for r in $RES; do |
This file contains 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
#cloud-config | |
hostname: dor | |
coreos: | |
etcd2: | |
advertise-client-urls: "http://$public_ipv4:2379" | |
listen-client-urls: "http://0.0.0.0:2379" | |
units: | |
- name: etcd2.service |
This file contains 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
if starting: | |
ticks = 0 | |
def update(): | |
global ticks | |
ticks += 1 | |
diagnostics.watch(ticks) | |
if (ticks >= 100): | |
ticks = 0 | |
if keyboard.getKeyDown(Key.LeftShift) and mouse.leftButton: |
This file contains 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
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
int pack(void *strct, unsigned char buf[], size_t size) { | |
int i = 0; | |
unsigned char *byte; | |
for (byte = (unsigned char *)strct; size--; ++byte) | |
buf[i++] = *byte; |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct uri_param { | |
char *key; | |
char *value; | |
}; | |
struct uri { |
NewerOlder