View snmp-trap-enable
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
# Enable SNMP | |
USER= | |
PASS= | |
IPMI_HOST= | |
TARGET=127.0.0.1 | |
INDEX=1 # one indexed alert to set | |
SESSION_ID=$(curl -d "name=${USER}&pwd=${PASS}" "https://${IPMI_HOST}/cgi/login.cgi" --silent --insecure -i | awk '/Set-Cookie/ && NR != 2 { print $2 }') | |
# Severity -> |
View repack.sh
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/bash | |
set -e | |
echo "Checking required dependencies..." | |
which wget >& /dev/null | |
which parted >& /dev/null | |
which mksquashfs >& /dev/null | |
which unsquashfs >& /dev/null |
View test patch
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
--- | |
src/core/initialize.rs | 17 +++++++++++++++++ | |
src/main.rs | 4 ++++ | |
2 files changed, 21 insertions(+) | |
diff --git a/src/core/initialize.rs b/src/core/initialize.rs | |
index c6bed8b..2ea1b2e 100644 | |
--- a/src/core/initialize.rs | |
+++ b/src/core/initialize.rs | |
@@ -92,10 +92,18 @@ impl StackTraceGetter { |
View gmailstats.gs
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
// To load this script, open a Google Sheet (yeah, weird I know), then select "Tools->Script Editor" | |
// From there, past this content into a script. You can set up triggers to run this script every day at a certain time | |
// by selecting Resources -> Triggers. | |
// I recommend you set the trigger to every 5-10 minutes. This will let the batches complete. If the trigger is too infrequent, it wont have time to finish. | |
// https://developers.google.com/apps-script/reference/gmail/ | |
// For large inboxes (the ones you want to analyze) gmail will rate limit you. | |
// They recommend adding a sleep to call less, but then your exec time will be too long. | |
// To solve this, we run in batches. This is the batch size. Decrease this if exec time is too long. |
View 0001-Pull-patch-onto-1.17.8-drop-systemtap-specifics.patch
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
From d75537062f1f72b8dc6115f1960d6f56a47c3793 Mon Sep 17 00:00:00 2001 | |
From: Dale Hamel <dale.hamel@shopify.com> | |
Date: Tue, 10 Mar 2020 18:46:03 -0400 | |
Subject: [PATCH] Pull patch onto 1.17.8, drop systemtap specifics | |
--- | |
README | 17 +++++++- | |
auto/make | 43 ++++++++++++++++++ | |
auto/modules | 3 +- | |
auto/options | 11 ++++- |
View gist:782cbbb9f343c48a112f
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/bash | |
cp /etc/fstab /etc/fstab.bak | |
while read line; do | |
drive=$(echo $line | awk '{print $1}') | |
if [[ $drive =~ /dev/sd.* ]];then | |
uuid=$(blkid | grep $drive | sed 's/.*\sUUID="\([a-zA-Z0-9-]*\)".*/\1/g') | |
sed -i "s:$drive:UUID=$uuid:g" /etc/fstab | |
fi | |
done < /etc/fstab |
View mcsnopp.bt
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
usdt::memcached:command__get, | |
usdt::memcached:command__set, | |
usdt::memcached:command__add, | |
usdt::memcached:command__replace, | |
usdt::memcached:command__prepend, | |
usdt::memcached:command__append, | |
usdt::memcached:command__cas | |
{ | |
@calls[str(arg1, arg2)]++; | |
@bytes[str(arg1, arg2)]+= arg3; |
View simple_epoll_inotify_test.c
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 <sys/inotify.h> | |
#include <sys/time.h> | |
#include <sys/epoll.h> | |
#include <errno.h> | |
#include <linux/memfd.h> | |
#include <sys/mman.h> | |
#include <sys/syscall.h> |
View simple_epoll_inotify_test.c
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 <sys/inotify.h> | |
#include <sys/time.h> | |
#include <sys/epoll.h> | |
#include <errno.h> | |
#include <linux/memfd.h> | |
#include <sys/mman.h> | |
#include <sys/syscall.h> |
View docker-desktop-headers.sh
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/bash | |
set -x | |
set -e | |
KERNEL_VERSION="${KERNEL_VERSION:-$(uname -r)}" | |
kernel_version="$(echo "${KERNEL_VERSION}" | awk -vFS=- '{ print $1 }')" | |
major_version="$(echo "${KERNEL_VERSION}" | awk -vFS=. '{ print $1 }')" | |
apt-get install -y build-essential bc curl flex bison libelf-dev |
NewerOlder