Skip to content

Instantly share code, notes, and snippets.


Travis Delly Dellybro

View GitHub Profile
View CustomViews.h
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height)
#define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width)
#define ESTIMATEDPHONEHEIGHT ([[UIScreen mainScreen] bounds].size.height)/667
#define ESTIMATEDPHONEWIDTH ([[UIScreen mainScreen] bounds].size.width)/375
View User.rb
class User < ActiveRecord::Base
# Validation methods
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
validates :email, presence: true, length: { maximum: 255 },
format: { with: VALID_EMAIL_REGEX },
uniqueness: { case_sensitive: false }
validates :password, confirmation: true, length: { minimum: 6},
unless: { |user| user.password.blank? }
View authorization.js
var models = require('../../models')
var Log = require('../../tools/Log')
var jwt = require('jsonwebtoken')
var config = require('../../config')
var Sequelize = require('sequelize');
var authChecker = function(req, res, next){
if(req.cookies['retco']) {
jwt.verify(req.cookies['retco'], config.PUBLICKEY, {algorithms: ['RS256']}, (err, decoded) => {
if (err) {
View CustomScripts.js
module.exports = {
intersection: function(array1, array2) {
var returnedArray = [];
for (var i = 0; i < array1.length; i++) {
return returnedArray;
View TutorialScreenController.h
#import <UIKit/UIKit.h>
#import "TutorialScreenController.h"
@interface TutorialPopoverScreen : UIViewController
@property (assign, nonatomic) NSInteger index;
@property (strong, nonatomic) IBOutlet UILabel *screenNumber;
Dellybro / CustomScripts.h
Created Nov 22, 2016
CustomScript Files
View CustomScripts.h
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@interface CustomScripts : NSObject
+ (UIImage *)scaleImage:(UIImage *)image scaledToSize:(CGSize)newSize;
+ (void)addShadowToView:(UIView*)view options:(NSDictionary*)options;
+ (UIColor *)colorWithHexString:(NSString *)stringToConvert;

Keybase proof

I hereby claim:

  • I am dellybro on github.
  • I am dellybro ( on keybase.
  • I have a public key whose fingerprint is D4DB 8917 DFBC 7E21 625C CD86 0215 612A F5B0 F453

To claim this, I am signing this object: