Skip to content

Instantly share code, notes, and snippets.

Ernest Surudo elsurudo

Block or report user

Report or block elsurudo

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@elsurudo
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>
@optional
- (void)eventSourceDidOpenConnection:(EventSource*)eventSource;
- (void)eventSource:(EventSource*)eventSource didFailWithError:(NSError*)error;
@elsurudo
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: http://jes.al/2014/11/creating-rails-concern-accepts-argumentsparameters/
module Obfuscation
extend ActiveSupport::Concern
You can’t perform that action at this time.