Skip to content

Instantly share code, notes, and snippets.

Avatar

Robert Hafner tedivm

View GitHub Profile
@tedivm
tedivm / packer_iam.tf
Created Sep 10, 2020
Packer IAM Role in Terraform
View packer_iam.tf
data "aws_caller_identity" "current" {}
data "aws_region" "current" {}
locals {
rolename = "${local.identifier}-${data.aws_region.current.name}"
}
data "aws_iam_policy_document" "packer" {
@tedivm
tedivm / README.md
Last active Apr 3, 2020
JSON Lines to CSV
View README.md

Installation

  1. Copy the jsonl_to_csv.py to your filesystem.
  2. Give it permissions to run using the command chmod +x jsonl_to_csv.py
  3. To get the full help documentation run ./jsonl_to_csv.py
View gist:340b7ae117e7c07503a2e09b6aee303e
My name is INSERT NAME and I am the INSERT TITLE of INSERT COMPANY NAME. A website that your company hosts (according to WHOIS information) is infringing on at least one copyright owned by my company.
An article was copied onto your servers without permission. The original ARTICLE/PHOTO, to which we own the exclusive copyrights, can be found at:
PROVIDE WEBSITE URL
The unauthorized and infringing copy can be found at:
PROVIDE WEBSITE URL
@tedivm
tedivm / audit.rules
Created Aug 8, 2018 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
View audit.rules
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
View gridtext.js
// http://www.urbanfonts.com/fonts/Arcade.htm
var font = {}
font['a'] = [
[0,0,0,0,0,0,0],
[0,0,0,0,0,0,0],
[0,1,1,1,1,1,0],
[0,0,0,0,0,1,1],
[0,1,1,1,1,1,1],
[1,1,0,0,0,1,1],
View docker-cheat-sheat.md

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@tedivm
tedivm / apt_wait.sh
Created Apr 22, 2018
A BASH function to wait for `apt` to finish and release all locks.
View apt_wait.sh
#!/usr/bin/env bash
apt_wait () {
while sudo fuser /var/lib/dpkg/lock >/dev/null 2>&1 ; do
sleep 1
done
while sudo fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ; do
sleep 1
done
if [ -f /var/log/unattended-upgrades/unattended-upgrades.log ]; then
@tedivm
tedivm / .screeps.yaml
Last active Apr 13, 2018
Screeps Standard Config File
View .screeps.yaml
connections:
main:
host: screeps.com
secure: true
token: '35a345b9-bc6b-4855-8566-66b341913f9b'
ptr:
host: screeps.com
secure: true
token: '35a345b9-bc6b-4855-8566-66b341913f9b'
ptr: true
View vagrant_404
INFO global: Vagrant version: 2.0.2
INFO global: Ruby version: 2.4.3
INFO global: RubyGems version: 2.6.14
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-2.0.2/bin/vagrant"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_INSTALLER_VERSION="2"
INFO global: resolv replacement has been enabled!
INFO global: Plugins:
@tedivm
tedivm / README.md
Last active Jan 28, 2019
Screeps Private Server Setup (Ubuntu, Mongo, Redis)
View README.md
  1. Download setup.sh and replace STEAM_KEY with your key and update any versions you want.
  2. Run setup.sh.
  3. Replace mods.json with one provided here.
  4. Create service file by copying file here to /etc/systemd/system/screeps-world.service.
  5. Enable and run service (systemctl enable screeps-world && systemctl start screeps-world).
  6. Log into the cli (su screeps && cd ~/world && ./node_modules/screeps/bin/screeps.js cli).
  7. Reset memory (system.resetAllData()) and restart (systemctl restart screeps-world.
You can’t perform that action at this time.