Skip to content

Instantly share code, notes, and snippets.

View hetelek's full-sized avatar

Stergios Hetelekides hetelek

View GitHub Profile
@eoghain
eoghain / CustomInteractiveAnimationNavigationController.swift
Last active August 11, 2024 09:49
UINavigationController that implements swipe to push/pop in an interactive animation. Just implement the InteractiveNavigation protocol on your ViewControllers you add to the nav stack to get custom transitions. Or implement a single animation and return it instead of the nil's in the UIViewControllerTransitioningDelegate and all transitions wil…
import UIKit
protocol InteractiveNavigation {
var presentAnimation: UIViewControllerAnimatedTransitioning? { get }
var dismissAnimation: UIViewControllerAnimatedTransitioning? { get }
func showNext()
}
enum SwipeDirection: CGFloat, CustomStringConvertible {
@markusklems
markusklems / lambda-dynamo
Last active September 24, 2021 03:48
Short aws lambda sample program that puts an item into dynamodb
// create an IAM Lambda role with access to dynamodb
// Launch Lambda in the same region as your dynamodb region
// (here: us-east-1)
// dynamodb table with hash key = user and range key = datetime
console.log('Loading event');
var AWS = require('aws-sdk');
var dynamodb = new AWS.DynamoDB({apiVersion: '2012-08-10'});
exports.handler = function(event, context) {
@landaire
landaire / controller_disconnect.md
Last active November 23, 2020 22:12
Xbox 360 Dev Kit Controller Disconnect

Why controllers get disconnected, and why am I making this note?

Controllers get disconnected because they fail an authentication check that Microsoft broke at some point in time. Some people are unable to obtain newer recoveries because they simply do not have contacts or access to a GDN account, and are stuck on one of these broken recoveries

What do to fix making

Patch RgcSecAuthenticateDeviceAsyncStateMachine + 0x704 (should be a bge instruction, where if cr6 -- the result of r11 >= r10 -- then the authentication succeeds) so that this always branches to the "successful" block of code leaving the auth fail code as simply dead, unreachable code.

RgcSecAuthenticateDeviceAsyncStateMachine target