Skip to content

Instantly share code, notes, and snippets.

View victor's full-sized avatar
:octocat:
rebasing

Víctor Jalencas victor

:octocat:
rebasing
View GitHub Profile
@victor
victor / hexString.swift
Created October 14, 2015 19:27
Simpler way to obtain a String from a byte array (such as a device token)
import UIKit
let bytes: [UInt8] = [0xDE, 0xAD, 0xBE, 0xEF, 0x42]
let hex = bytes.reduce("", combine: { $0 + String($1, radix:16, uppercase:true) })
@jasonrudolph
jasonrudolph / about.md
Last active January 6, 2024 07:40
Programming Achievements: How to Level Up as a Developer
@omz
omz / gist:1102091
Created July 24, 2011 01:40
Creating arbitrarily-colored icons from a black-with-alpha master image (iOS)
// Usage example:
// input image: http://f.cl.ly/items/3v0S3w2B3N0p3e0I082d/Image%202011.07.22%2011:29:25%20PM.png
//
// UIImage *buttonImage = [UIImage ipMaskedImageNamed:@"UIButtonBarAction.png" color:[UIColor redColor]];
// .h
@interface UIImage (IPImageUtils)
+ (UIImage *)ipMaskedImageNamed:(NSString *)name color:(UIColor *)color;
@end
@somebox
somebox / gh-like.css
Created July 14, 2011 14:55
github markdown css+script with syntax highlighting. Works with http://markedapp.com
/*
Some simple Github-like styles, with syntax highlighting CSS via Pygments.
*/
body{
font-family: helvetica, arial, freesans, clean, sans-serif;
color: #333;
background-color: #fff;
border: none;
line-height: 1.5;
margin: 2em 3em;