Skip to content

Instantly share code, notes, and snippets.


Ernest Surudo elsurudo

View GitHub Profile
elsurudo / obfuscation.rb
Created Mar 25, 2019
Knuthy Obfuscation (Optimus Prime)
View obfuscation.rb
# app/models/concerns/obfuscation.rb
# ID obfuscation using Optimus algorithm
# TODO if we want to use this with more classes, it'd
# be best to make sure we use a different random seed
# for each model.
# Do something like this:
module Obfuscation
extend ActiveSupport::Concern
elsurudo / EventSource.h
Last active Jul 18, 2016
Class to handle Server Sent Events in a similar way to browser EventSource
View EventSource.h
#import <Foundation/Foundation.h>
@class EventSource;
@protocol EventSourceDelegate <NSObject>
- (void)eventSourceDidOpenConnection:(EventSource*)eventSource;
- (void)eventSource:(EventSource*)eventSource didFailWithError:(NSError*)error;
You can’t perform that action at this time.