Skip to content

Instantly share code, notes, and snippets.

@Altimor
Altimor / clean-google-docs.css
Last active June 28, 2019 17:42 — forked from devonzuegel/clean-google-docs.css
Custom styles for Stylus Chrome extension
#docs-editor {
background-color: white !important;
}
.kix-paginateddocumentplugin.kix-paginateddocumentplugin-compact-mode {
box-shadow: none;
}
.navigation-widget {
border-right: 1px solid #ddd;
#define MAINLABEL_TAG 1
#define SECONDLABEL_TAG 2
#define PHOTO_TAG 3
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"ImageOnRightCell";
UILabel *mainLabel, *secondLabel;
UIImageView *photo;
@Altimor
Altimor / gist:f48715200dc049fca69d
Created November 26, 2014 05:22
UIView+Border
#import <PureLayout/PureLayout.h>
@interface UIView (Border)
- (void)addBorder:(ALEdge)side withColor:(UIColor *)borderColor width:(CGFloat)width;
@end
@implementation UIView (Border)
//
// UILabel+AprilFools.m
//
// Created by Florent Crivello on 4/1/14.
//
#import "UILabel+AprilFools.h"
#import "objc/runtime.h"
#import "objc/message.h"
@Altimor
Altimor / gist:7166276
Created October 26, 2013 07:15
PIPOTW: Outward Counterclockwise Spiral Matrix Traversal
- (NSArray*)spirralArrayFromGridOfWidth:(int)width height:(int)height startline:(int)line column:(int)column{
NSMutableArray *returnArray = [NSMutableArray new];
int currentDirectionIndex = 0;
int currentInt;
int nextPivotal = 3;
int numOfPivotal = 1;
line++;
for(int i=1;i<=width*height; i++){
if(nextPivotal == i){
@Altimor
Altimor / Biggest sum of consecutive NSNumbers in an NSArray
Last active December 25, 2015 05:48
Biggest sum of consecutive NSNumbers in an NSArray
- (int) biggestSum:(NSArray*)array{
int final = 0;
int tempfinal = 0;
for(int i = 0; i < array.count; i++){
tempfinal = MAX(tempfinal+[((NSNumber*)array[i]) intValue],0);
final = MAX(final,tempfinal);
}
return final;
}