Skip to content

Instantly share code, notes, and snippets.

View robinkunde's full-sized avatar

Robin Kunde robinkunde

View GitHub Profile
@matthewmueller
matthewmueller / osx-for-hackers.sh
Last active February 20, 2025 09:37
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
@rcackermanCC
rcackermanCC / request_builder.md
Last active January 31, 2020 18:24
S3 request

To know what you want in a secure way, S3 requires a signature. The signature is created by:

  1. assembling a canonical requst
  2. putting together some parts of the request together with a hashed version of the full request - this is the string to sign
  3. creating a signing key
  4. using the signing key to create a signature from the string to sign

Step 1

@rygorous
rygorous / gist:e0f055bfb74e3d5f0af20690759de5a7
Created May 8, 2016 06:54
A bit of background on compilers exploiting signed overflow
Why do compilers even bother with exploiting undefinedness signed overflow? And what are those
mysterious cases where it helps?
A lot of people (myself included) are against transforms that aggressively exploit undefined behavior, but
I think it's useful to know what compiler writers are accomplishing by this.
TL;DR: C doesn't work very well if int!=register width, but (for backwards compat) int is 32-bit on all
major 64-bit targets, and this causes quite hairy problems for code generation and optimization in some
fairly common cases. The signed overflow UB exploitation is an attempt to work around this.
@ruurdadema
ruurdadema / NetworkConnection.swift
Last active February 26, 2025 23:59
Swift networking with Apple's NWListener and NWConnection
/*
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the