Skip to content

Instantly share code, notes, and snippets.

@jdarowski
jdarowski / keybindings.txt
Created Apr 8, 2019 — forked from kumpelblase2/keybindings.txt
Vimium Dvorak Mappings
View keybindings.txt
# 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 / UIDeviceHardware.h
Last active Aug 29, 2015 — forked from Jaybles/UIDeviceHardware.h
UIDeviceHardware - Determine iOS device being used
View UIDeviceHardware.h
//
// 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 Mar 1, 2015
Shadowed cells in UICollectionView
View shadowedcells.m
- (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];
@jdarowski
jdarowski / roundedborders.m
Created Mar 1, 2015
Borders and rounded corners in UICollectionView
View roundedborders.m
- (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;
You can’t perform that action at this time.