Skip to content

Instantly share code, notes, and snippets.

View gdestuynder's full-sized avatar
🏔️
.

Guillaume Destuynder (:kang) gdestuynder

🏔️
.
View GitHub Profile
#!/bin/sh
# This script will monitor another NAT instance and take over its routes
# if communication with the other instance fails
# NAT instance variables
# Other instance's IP to ping and route to grab if other node goes down
NAT_ID=
NAT_RT_ID=
# My route to grab when I come back up
/**********
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
" Navigate with jkl; instead of hjkl
noremap ; l
noremap l k
noremap k j
noremap j h
#!/usr/bin/python2
# See http://elasticsearch-dsl.readthedocs.org/en/latest/search_dsl.html
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search, Q
from elasticsearch_dsl.connections import connections
from datetime import datetime
from datetime import timedelta
import pytz
import sys
#!/usr/bin/python
import sys
import os
import subprocess
def getfp(userid):
data=subprocess.check_output(['gpg', '--fingerprint',userid])
data=data.decode('ascii', 'ignore')
fp=data.split('fingerprint')[1].split('\n')[0].split('=')[1]
fp='0x'+fp.replace(' ', '')
gpg --keyserver hkp://pool.sks-keyservers.net --recv-keys 487EACC08557AD082088DABA1EB2638FF56C0C53
sudo pacman -S --needed --noconfirm base-devel git
cd /tmp
git clone "https://aur.archlinux.org/cower.git"
git clone "https://aur.archlinux.org/pacaur.git"
cd cower && makepkg --syncdeps --install --noconfirm
cd ..
cd pacaur && makepkg --syncdeps --install --noconfirm
rm -rf cower pacaur
File: mig loader service /etc/systemd/system/mig-loader.service
Do not enable/start manually (well, you can, but its not really useful)
----------------snip--------------
[Unit]
Description=Runs mig-loader, the mig update service.
[Service]
Type=oneshot
ExecStart=/sbin/mig-loader
~/git/mig (sandbox-kang) ⚡ git diff sandbox-kang..sandbox-mwos modules/scribe/
diff --git a/modules/scribe/scribe.go b/modules/scribe/scribe.go
index 81b2cef..d59365e 100644
--- a/modules/scribe/scribe.go
+++ b/modules/scribe/scribe.go
@@ -16,6 +16,7 @@ import (
"strconv"
"time"
+ "github.com/mozilla/mig-sandbox"
{
"_source": {
"category": "execve",
"processid": "0",
"receivedtimestamp": "2016-05-19T20:57:14.988457+00:00",
"severity": "INFO",
"utctimestamp": "2016-05-19T20:21:47+00:00",
"tags": [
"audisp-json",
"2.0.0",
diff --git a/simplecrypt.sh b/simplecrypt.sh
index ff3b177..af56d68 100755
--- a/simplecrypt.sh
+++ b/simplecrypt.sh
@@ -72,7 +72,7 @@ function main()
[[ -z "${flatulist}" ]] && {
fatal "Empty fingerprint list, nobody to encrypt to then, that's a problem."
}
- sf=$(mktemp) || {
+ sf=$(mktemp -t crypt.XXX) || {