Skip to content

Instantly share code, notes, and snippets.

@BlackChar
BlackChar / fix_authkey_perms.cmd
Created September 13, 2019 21:10
Fix permissions on windows 10 openssh authorized_keys
move %userprofile%\.ssh\authorized_keys %programdata%\ssh\administrators_authorized_keys
cd %programdata%\ssh\
icacls administrators_authorized_keys /inheritance:r
icacls administrators_authorized_keys /grant SYSTEM:(F)
icacls administrators_authorized_keys /grant BUILTIN\Administrators:(F)
#
# NCSA Telnet like .screenrc - by Antoni Sawicki <tenox@tenox.tc>
# Copy and modify as you like. Submissions are welcome. Have Fun!
#
msgminwait 0
msgwait 0
startup_message off
caption splitonly
caption always "%{= gk}%-Lw%{= bW}%50> %n%f* %t %{-}%+Lw%< %= %{= rk} %H %l %{= gk} %0c:%s %{-}"
shelltitle bash
@BlackChar
BlackChar / ecr_cleanup_images.sh
Created July 21, 2017 16:48
Script searches for images pushed to ECR older than specified (default is 30 days)
#!/bin/bash
# Usage: $0 {days} [--delete]
# Script searches for images pushed to ECR older than specified (default is 30 days)
# Checks if image is not running in any ECS container and then prints deletion command
# or deletes it directly.
#
# Script needs working AWSCLI config (`aws configure`) to function
DAYS=${1:-"30"}
# encoding: utf-8
from construct import *
import traceback
''' Sources:
http://furlocks-forest.net/wiki/?page=Pokemon_GBA_Save_Format
http://bulbapedia.bulbagarden.net/wiki/Pok%C3%A9mon_data_structure_in_the_GBA
'''
@BlackChar
BlackChar / rules-ipv4.iptables
Created September 18, 2012 13:44 — forked from jirutka/rules-both.iptables
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# Copyright 2012 Jakub Jirutka. All rights reserved.
#
# "THE KOFOLA-WARE LICENSE" (Revision 1):
# Jakub Jirutka originally wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is worth it, you can buy me a Kofola in return. <jakub@jirutka.cz>
#
###############################################################################