Skip to content

Instantly share code, notes, and snippets.

@NoahSaso
NoahSaso / diff.js
Created November 9, 2022 20:58
DAO DAO UI V2 Translation Updates
// Added 270:
[
{
"key": "button.addCollection",
"value": "Add collection"
},
{
"key": "button.addMembers",
"value": "Add members"
},
@NoahSaso
NoahSaso / AutoHook.h
Last active April 17, 2020 21:13 — forked from JohnCoates/AutoHook.h
Simple Objective-C Protocol Method Hooking
@protocol AutoHook <NSObject>
@required
+ (NSString *)targetProtocol;
@end
@NoahSaso
NoahSaso / keybase.md
Created March 28, 2020 21:02
Proving Keybase identity

Keybase proof

I hereby claim:

  • I am noahsaso on github.
  • I am noahsaso (https://keybase.io/noahsaso) on keybase.
  • I have a public key ASDRj93jBqPZzGgSoYx_567qCQNe1iM3XyAI-yEZ_1Me3Qo

To claim this, I am signing this object:

class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery
private
def require_user
unless @current_user
store_location
flash[:notice] = "You must be logged in to access this page"
redirect_to login_url
@NoahSaso
NoahSaso / iOSVersion.m
Created November 4, 2014 23:56
Verify/check local iOS device version. Modified by me, added some useful macros. Original: https://gist.github.com/alex-cellcity/998472
/*
* System Versioning Preprocessor Macros
*/
// Already exists, taken from https://gist.github.com/alex-cellcity/998472
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)