Skip to content

Instantly share code, notes, and snippets.

View mnem's full-sized avatar

Dave Clayton-Wagner mnem

View GitHub Profile
@mnem
mnem / ConEmu.xml
Last active January 20, 2019 09:22
My ConEmu.xml file. See comment for further details and how to install. To find out more about ConEmu, see: https://code.google.com/p/conemu-maximus5/
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2013-08-29 11:28:09" build="130827">
<value name="ColorTable00" type="dword" data="00000000"/>
<value name="ColorTable01" type="dword" data="00ee0000"/>
<value name="ColorTable02" type="dword" data="0000cd00"/>
<value name="ColorTable03" type="dword" data="00cdcd00"/>
<value name="ColorTable04" type="dword" data="000000cd"/>
<value name="ColorTable05" type="dword" data="00cd00cd"/>
@mnem
mnem / install_all_the_things.sh
Last active September 7, 2016 21:03
Things to install on a fresh Mac: bash <(curl -fsSL https://gist.github.com/mnem/6560977/raw/install_all_the_things.sh)
#!/usr/bin/env bash
function execute_after_confirm {
read -p "$1 ($2) ? [y/n] " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
shift
for var in "$@"
do
@floriankugler
floriankugler / gist:6870499
Last active September 29, 2023 15:56
Mapping of NSURLConnection to NSURLSession delegate methods. Created by Mattt Thompson.
NSURLConnection | NSURLSession
------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------
NSURLConnectionDelegate connectionShouldUseCredentialStorage: |
------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------
NSURLConnectionDelegate connection:willSendRequestForAuthenticationChallenge: | NSURLSessionDelegate URLSession:didReceiveChallenge:completionHandler:
| N
@mnem
mnem / game_dev_links.md
Last active December 15, 2023 22:38
Some game dev links that I should probably keep note of.
anonymous
anonymous / statement.md
Created January 3, 2014 01:38
Gibson Security (aka GibSec, GibsonSec) statement on the latest snapchat blog post Follow our twitter (@gibsonsec) or email us at [email protected]

#####Gibson Security (aka GibSec, GibsonSec) statement on the latest snapchat blog post.

Follow our twitter (@GibsonSec) or email us at [email protected]


In your blog post, you made a couple statements and you left a few things out, we want (on the behalf of the Snapchat user base) a few things cleared up:

A security group first published a report about potential Find Friends abuse in August 2013. Shortly thereafter, we implemented practices like rate limiting aimed at addressing these concerns. On Christmas Eve, that same group publicly documented our API, making it easier for individuals to abuse our service and violate our Terms of Use.

But is the exploit patched? I wouldn’t want to test, because I might get told “abusing” the service. A phone number, real name (most snapchat usernames i’ve seen have a full name in them) and location (whitepages and the area code) can get you pretty far when yo

- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
// maybe show an action sheet with more options
[self.tableView setEditing:NO];
}];
moreAction.backgroundColor = [UIColor lightGrayColor];
UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
[self.tableView setEditing:NO];
}];
@rbobbins
rbobbins / protocols.md
Last active June 11, 2024 22:11
Notes from "Protocol-Oriented Programming in Swift"

PS: If you liked this talk or like this concept, let's chat about iOS development at Stitch Fix! #shamelessplug

Protocol-Oriented Programming in Swift

Speaker: David Abrahams. (Tech lead for Swift standard library)

  • "Crusty" is an old-school programmer who doesn't trust IDE's, debuggers, programming fads. He's cynical, grumpy.

  • OOP has been around since the 1970's. It's not actually new.

  • Classes are Awesome

    • Encapsulation
    • Access control
@vkostyukov
vkostyukov / statuses.md
Last active May 15, 2025 19:29
HTTP status codes used by world-famous APIs
API Status Codes
[Twitter][tw] 200, 304, 400, 401, 403, 404, 406, 410, 420, 422, 429, 500, 502, 503, 504
[Stripe][stripe] 200, 400, 401, 402, 404, 429, 500, 502, 503, 504
[Github][gh] 200, 400, 422, 301, 302, 304, 307, 401, 403
[Pagerduty][pd] 200, 201, 204, 400, 401, 403, 404, 408, 500
[NewRelic Plugins][nr] 200, 400, 403, 404, 405, 413, 500, 502, 503, 503
[Etsy][etsy] 200, 201, 400, 403, 404, 500, 503
[Dropbox][db] 200, 400, 401, 403, 404, 405, 429, 503, 507
@ramiabraham
ramiabraham / rom_suffix_codes.md
Last active April 26, 2025 16:21
Video game rom suffix codes (decoded)

Video game rom codes

You wouldn't download a car...


Primary rom codes

Probably what you're looking for

  • [a] Alternate (alternate version of the game, usually trying a different output method)
  • [p] Pirate
@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.