Skip to content

Instantly share code, notes, and snippets.

View tedivm's full-sized avatar

Robert Hafner tedivm

View GitHub Profile
@tedivm
tedivm / gridtext.js
Created May 26, 2018 01:03
GridText
// 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],
@tedivm
tedivm / audit.rules
Created August 8, 2018 06:03 — forked from Neo23x0/audit.rules
Linux Auditd Best Practice Configuration
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
#
# Linux Audit Daemon - Best Practice Configuration
# /etc/audit/audit.rules
#
# Compiled by Florian Roth
@tedivm
tedivm / README.md
Last active January 28, 2019 23:26
Screeps Private Server Setup (Ubuntu, Mongo, Redis)
  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.
@tedivm
tedivm / gist:340b7ae117e7c07503a2e09b6aee303e
Created September 19, 2019 21:26
DMCA Takedown Template
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 / image_to_ios_launch.py
Created March 21, 2017 22:11
ios image asset creation
#!/usr/bin/env python
import sys
import subprocess
if len(sys.argv) < 3:
print('image_to_ios_launch.py InputImage BackgroundColor [OutputPrefix]')
exit(-1)
input_image = sys.argv[1]
@tedivm
tedivm / README.md
Last active April 3, 2020 22:56
JSON Lines to CSV

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
@tedivm
tedivm / sos_lib_crypto.js
Created May 27, 2017 05:50
ScreepsOS Crytpo Library
/*
Copyright (c) 2017 Robert Hafner <tedivm@tedivm.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@tedivm
tedivm / packer_iam.tf
Created September 10, 2020 04:29
Packer IAM Role in Terraform
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 / emprise_dump
Created February 9, 2021 05:15
Emprise Data
Roberts-MacBook-Pro-3:emprise robert$ node server/cli.js dump |
Compilation WARNING (equipment "basic_healing" from "/Users/robert/Repositories/emprise/game/items/potions.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "advanced_healing" from "/Users/robert/Repositories/emprise/game/items/potions.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "druid_staff" from "/Users/robert/Repositories/emprise/game/items/weapons.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "crappy_sword" from "/Users/robert/Repositories/emprise/game/items/weapons.yaml"): Missing recommended parameter "description".
Compilation WARNING (adventure "cabin_hidden_map" from "/Users/robert/Repositories/emprise/game/locations/forest/cabin/adventures/hidden_map.yaml"): Missing recommended parameter "description".
Compilation WARNING (equipment "map_to_grove" from "/Users/robert/Repositories/emprise/game/locations/forest/cabin/adventures/
// screep astar
// based off of javascript-astar 0.4.1
// http://github.com/bgrins/javascript-astar
// Freely distributable under the MIT License.
// Implements the astar search algorithm in javascript using a Binary Heap.
// Includes Binary Heap (with modifications) from Marijn Haverbeke.
// http://eloquentjavascript.net/appendix2.html
// Modified for Screeps by Robert Hafner