Skip to content

Instantly share code, notes, and snippets.

@H0neyBadger
H0neyBadger / conf.json
Created August 8, 2015 15:20
Splatfest popularity predictions (based on twitter search API, Python3 and python requests)
{
"api_keys":{
"key":"your_consumer_key",
"secret":"your_oauth_secret"
},
"search_query":"#Splatoon AND (north -america -american OR south) since:2015-08-01 -filter:retweets",
"team1":{
"name":"Regex South",
"regex":"South"
},
@H0neyBadger
H0neyBadger / id_list.txt
Last active May 12, 2016 03:59
splatoon 2.3.0 [PAL eur] unlock all gears and weapons (WARNING: this function will override all existing objects) (TCPGecko, python 2.7)
id:00000001 num:1 name:First long:Shs_First brand:B02
id:000003e8 num:2 name:SLO000 long:Shs_SLO000 brand:B04
id:000003e9 num:3 name:SLO001 long:Shs_SLO001 brand:B02
id:000003ea num:4 name:SLO002 long:Shs_SLO002 brand:B04
id:000003eb num:5 name:SLO003 long:Shs_SLO003 brand:B01
id:000003ec num:6 name:SLO004 long:Shs_SLO004 brand:B04
id:000003ed num:7 name:SLO005 long:Shs_SLO005 brand:B01
id:000003ee num:8 name:SLO006 long:Shs_SLO006 brand:B02
id:000003ef num:9 name:SLO007 long:Shs_SLO007 brand:B01
id:000003f0 num:10 name:SLO008 long:Shs_SLO008 brand:B08
@H0neyBadger
H0neyBadger / README.md
Last active March 31, 2018 10:00
selinux test policy

List policy

sesearch --allow -C --target=cifs_t --class=file --perm=create
sesearch --allow -C --target=cifs_t --class=dir --perm=remove_name

Compile

make -f /usr/share/selinux/devel/Makefile privadmin.pp
@H0neyBadger
H0neyBadger / clear_custom.service
Last active January 20, 2018 15:36
Systemd custom production target
# /etc/systemd/system/clear_custom.service
[Unit]
Description=Clear custom lock
After=custom.target
[Service]
Type=oneshot
ExecStart=/bin/rm /noprod
KillMode=process
@H0neyBadger
H0neyBadger / ActivityReport.vbs
Created January 25, 2018 13:27
Excel activity report
Sub ActivityReportMaker()
Dim Days(1 To 7) As String
Days(1) = "dim"
Days(2) = "lun"
Days(3) = "mar"
Days(4) = "mer"
Days(5) = "jeu"
Days(6) = "ven"
Days(7) = "sam"
@H0neyBadger
H0neyBadger / test_udp.py
Created February 11, 2018 15:43
Python udp
#!/usr/bin/env python
# coding: utf-8
import socket
import IN
from ctypes import *
from threading import Thread
from time import sleep
# TODO import these value
@H0neyBadger
H0neyBadger / Makefile
Created February 25, 2018 21:08
selinux custom_app tests
TARGETS?=custom_app
MODULES?=${TARGETS:=.pp.bz2}
SHAREDIR?=/usr/share
all: ${TARGETS:=.pp.bz2}
%.pp.bz2: %.pp
@echo Compressing $^ -\> $@
bzip2 -9 $^
@H0neyBadger
H0neyBadger / .profile
Created May 12, 2018 18:22
linux profile
# load ssh vars
# SSH_AUTH_SOCK=/tmp/ssh-XOw0SlklDoPT/agent.2154
# SSH_AGENT_PID=2155
source .ssh_agent
pgrep ssh-agent --uid "$(id -u)" -ns "${SSH_AGENT_PID}"
if [ $? != 0 ]
then
eval "$(ssh-agent)"
ssh-add
@H0neyBadger
H0neyBadger / README.md
Last active July 21, 2018 12:04
RPMChordGraph
@H0neyBadger
H0neyBadger / key2sha
Created October 12, 2018 15:38
authorized_keys to SHA256
while IFS= read -r line; do
A=$( echo "$line" | awk '{print $2}' | base64 -d | sha256sum -b | awk '{print $1}' | xxd -r -p | base64)
echo "$A"
done < .ssh/authorized_keys