Skip to content

Instantly share code, notes, and snippets.

@xpepper
xpepper / LondonVsChicago.md
Last active November 4, 2023 22:57
London vs Chicago, Comparative Case Study - Sandro Mancuso and Uncle Bob

My notes on the video series "London vs Chicago TDD styles" by Uncle Bob And Sandro Mancuso

The git repo of the kata is here: https://github.com/sandromancuso/cleancoders_openchat/

The "starting-point" branch is where both implementations began: https://github.com/sandromancuso/cleancoders_openchat/tree/starting-point

  • The 🇬🇧 "openchat-outside-in" branch captures the tomato by tomato history of the London approach.
  • The 🇺🇸 "openchat-unclebob" branch captures the tomato by tomato history of the Chicago approach.

What I like about Sandro's style 👍

@Neo23x0
Neo23x0 / audit.rules
Last active January 13, 2024 14:12
Linux Auditd Best Practice Configuration
# IMPORTANT!
# This gist has been transformed into a github repo
# You can find the most recent version there:
# https://github.com/Neo23x0/auditd
# ___ ___ __ __
# / | __ ______/ (_) /_____/ /
# / /| |/ / / / __ / / __/ __ /
# / ___ / /_/ / /_/ / / /_/ /_/ /
# /_/ |_\__,_/\__,_/_/\__/\__,_/
@hellman
hellman / rsa_timing_attack_d_Montgomery.py
Created May 1, 2017 12:23
DEF CON 2017 Quals - Godzilla (Reverse/Crypto)
#-*- coding:utf-8 -*-
'''
DEF CON 2017 Quals - Godzilla (Reverse)
Timing attack on RSA decryption.
Based on http://www.cs.jhu.edu/~fabian/courses/CS600.624/Timing-full.pdf
Another solutions:
https://gist.github.com/nneonneo/367240ae2d8e705bb9173a49a7c8b0cd by b2xiao
https://gist.github.com/Riatre/caac24840b176cf843b3f66ad9a5eeaf by riatre
@KyleHanslovan
KyleHanslovan / DomainEnumeration.bat
Created June 25, 2016 12:36
Post-exploitation host/domain survey using native Windows commands.
whoami & hostname & ipconfig /all & net user /domain 2>&1 & net group /domain 2>&1 & net group "domain admins" /domain 2>&1 & net group "Exchange Trusted Subsystem" /domain 2>&1 & net accounts /domain 2>&1 & net user 2>&1 & net localgroup administrators 2>&1 & netstat -an 2>&1 & tasklist 2>&1 & sc query 2>&1 & systeminfo 2>&1 & reg query "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" 2>&1
require 'pty'
require 'fileutils'
def execmd cmd
begin
PTY.spawn(cmd) do |r, w, pid|
begin
r.each { |line| print line;}
rescue Errno::EIO
end
@Lense
Lense / challenge.md
Last active June 29, 2016 15:55
CSAW 2014 quals: weissman (RE300.2) writeup

Extract the key!

Written by RyanWithZombies

Update: The key is not "flag{ don't trust the Cheshire cat!! he works for the Queen of Hearts }". Sorry about that. It's an artifact from an easier version of this challenge. You need to extract key.jpg.

HINT:

CSAWLZ is a completely custom format! You won't find decompressing tools on the internet. We made it just for you. :)

@maksverver
maksverver / A.py
Created November 25, 2013 01:13
Facebook Hacker Cup 2014 Qualification Round solutions
#!/usr/bin/env python3
for case in range(int(input())):
N = int(input())
grid = [ input() for _ in range(N) ]
black = [ (r,c) for r in range(N) for c in range(N) if grid[r][c] == '#' ]
(r1,c1),(r2,c2) = black[0], black[-1]
size = r2 - r1 + 1
rect = [ (r1+i,c1+j) for i in range(size) for j in range(size) ]
print('Case #{}: {}'.format(case + 1, "YES" if rect == black else "NO"))
@niw
niw / libpng_test.c
Last active November 12, 2023 19:54
How to read and write PNG file using libpng. Covers trivial method calls like png_set_filler.
/*
* A simple libpng example program
* http://zarb.org/~gc/html/libpng.html
*
* Modified by Yoshimasa Niwa to make it much simpler
* and support all defined color_type.
*
* To build, use the next instruction on OS X.
* $ brew install libpng
* $ clang -lz -lpng16 libpng_test.c