Skip to content

Instantly share code, notes, and snippets.

@jdarowski
jdarowski / keybindings.txt
Created April 8, 2019 11:14 — forked from kumpelblase2/keybindings.txt
Vimium Dvorak Mappings
# Insert your preferred key mappings here.
unmapAll
# Basic movement
map d scrollLeft
map h scrollDown
map t scrollUp
map n scrollRight
map ii scrollToTop
map I scrollToBottom
@jdarowski
jdarowski / roundedborders.m
Created March 1, 2015 12:04
Borders and rounded corners in UICollectionView
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productCell" forIndexPath:indexPath];
CALayer* layer = cell.layer;
[layer setCornerRadius:4.0f];
[layer setBorderColor:[UIColor colorWithWhite:0.8 alpha:1].CGColor];
[layer setBorderWidth:1.0f];
return cell;
@jdarowski
jdarowski / UIDeviceHardware.h
Last active August 29, 2015 14:27 — forked from Jaybles/UIDeviceHardware.h
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
//
// Based shamelessly upon https://gist.github.com/Jaybles/1323251
//
#import <Foundation/Foundation.h>
@jdarowski
jdarowski / shadowedcells.m
Created March 1, 2015 12:26
Shadowed cells in UICollectionView
- (UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
UICollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:@"productCell" forIndexPath:indexPath];
CALayer* layer = cell.layer;
[layer setMasksToBounds:NO];
[layer setShadowColor:[UIColor blackColor].CGColor];
[layer setShadowOffset:CGSizeMake(0.0f, 5.0f)];
[layer setShadowOpacity:0.3f];
[layer setShadowRadius:4.0f];