Skip to content

Instantly share code, notes, and snippets.

@agowa
agowa / mariadb_dev.yml
Last active October 13, 2017 00:57 — forked from ostcar/inyoka_dev.yml
ansible config for mysql and redis
---
- hosts: mariadb_dev
vars:
mysql_root_pw: ''
tasks:
- name: enable network
service:
name: '{{ item }}'
@agowa
agowa / post-commit
Last active January 27, 2018 18:52 — forked from leucos/post-commit
Transparent encryption/decryption with pre-commit and post-commit hooks
#!/bin/sh
#
# Post-commit hook that decrypts files containing '.vault'
#
# File should be .git/hooks/post-commit and executable
CRYPT_TAG='^.*\.vault(([\.]?)|(\..*))$'
EXIT_STATUS=0
wipe="\033[1m\033[0m"
INFO global: Vagrant version: 2.1.2
INFO global: Ruby version: 2.5.1
INFO global: RubyGems version: 2.7.7
INFO global: VAGRANT_LOG="info"
INFO global: VAGRANT_INSTALLER_EMBEDDED_DIR="/opt/vagrant/embedded"
INFO global: VAGRANT_EXECUTABLE="/opt/vagrant/embedded/gems/gems/vagrant-2.1.2/bin/vagrant"
INFO global: VAGRANT_DETECTED_OS="archlinux"
INFO global: VAGRANT_INSTALLER_ENV="1"
INFO global: VAGRANT_INSTALLER_VERSION="2"
WARN global: resolv replacement has not been enabled!
@agowa
agowa / 1_LsassImpersonation.ps1
Last active August 27, 2024 05:54
Get rid of "S-1-5-2" within your access token
Add-Type -TypeDefinition @'
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Security.Principal;
using System.Management.Automation;
public static class LsassImpersonation
{
[DllImport("advapi32.dll", SetLastError = true)]
@agowa
agowa / insufficient payment
Created November 5, 2018 09:56
Pretix Templates
Hello {invoice_name},
Your Payment for the event {event} is not sufficient, you have only payed $$_FILL_IN_MANUALLY_$$ instead of $$_FILL_IN_MANUALLY_$$. Please Transfer the missing amount within the next three days. If no payment is received, your order may be invalidated and any partial payment will be refunded.
You can change your order details and view the status of your order at
{url}
Best regards,
Your {event} team
@agowa
agowa / docker-clean.service
Last active May 7, 2019 17:31
gitlab-runner within docker systemd unit
[Unit]
Description=Cleanup and update docker image.
After=network.target docker.service
Requires=network.target docker.service
[Service]
ExecStartPre=/usr/bin/docker container prune -f
ExecStartPre=/usr/bin/docker image prune -f
ExecStartPre=/usr/bin/docker volume prune -f
ExecStartPre=/usr/bin/docker network prune -f
Vagrant.configure('2') do |config|
config.vm.box_check_update = false
config.vm.box = "archlinux/archlinux"
config.vm.synced_folder './', '/vagrant', type: 'nfs'
#Configure NAT64
config.vm.define "nat64" do |nat64|
nat64.vm.provider :libvirt do |v|
v.memory = 256
v.cpus = 1

Keybase proof

I hereby claim:

  • I am agowa on github.
  • I am agowa338 (https://keybase.io/agowa338) on keybase.
  • I have a public key ASCR_LqC93f1_6yHgdKDmXSTqYXw-xyATY7VV5w94lW6Swo

To claim this, I am signing this object:

@agowa
agowa / convert_INDEX_to_aria2c.ps1
Created January 25, 2020 01:48
INDEX to aria2c download file
#! /usr/bin/pwsh
$indexFileURL = "https://cdn.media.ccc.de/INDEX";
$indexFileLines = [System.Net.WebClient]::new().DownloadString($indexURL) -split "`n";
foreach($indexFileLine in $indexFileLines) {
$path = $indexFileLine -split "/";
$indexFileLine | Write-Output;
(" dir=./" + ($path[0..($path.Length-1)] -join "/")) | Write-Output;
(" out=" + $path[-1]) | Write-Output;
apiVersion: apps/v1
kind: Deployment
metadata:
name: samba-dc
spec:
selector:
matchLabels:
run: samba-dc
replicas: 1
template: