Skip to content

Instantly share code, notes, and snippets.

View tommypeps's full-sized avatar
🎯
Focusing

José Roldán Jiménez tommypeps

🎯
Focusing
View GitHub Profile
@tommypeps
tommypeps / listadoDeFuentes
Created August 14, 2014 19:05
Listado de fuentes cargadas en tu app - ejecutar en app delegate
for (NSString* family in [UIFont familyNames])
{
NSLog(@"%@", family);
for (NSString* name in [UIFont fontNamesForFamilyName: family])
{
NSLog(@" %@", name);
}
}
@tommypeps
tommypeps / osm2pgsql command
Created December 20, 2014 15:18
Comando para pasar ficheros .osm.pdf a base de datos pgsql
/*
Compila map para tile mill
-C ram que cogemos
-U usuario de la base de datos
-S ruta de estilo / ruta del fichero
*/
Verifying I am +tommypeps on my passcard. https://onename.com/tommypeps
@tommypeps
tommypeps / NSStringToInt
Created May 15, 2015 10:42
NSStringToNSNumber(int)
NSNumber * number = [[NSNumber alloc ] initWithInt:[@"2" integerValue]];
@tommypeps
tommypeps / regex name
Created September 25, 2015 12:59
Expresion regular para nombres con todo tipo de acentos
@"[ A-Za-zäÄëËïÏöÖüÜáéíóúáéíóúÁÉÍÓÚÂÊÎÔÛâêîôûàèìòùÀÈÌÒÙ.-]+"
-(void)configSearch
{
self.searchController = [[UISearchController alloc] initWithSearchResultsController:nil];
self.searchController.searchResultsUpdater = self;
self.searchController.dimsBackgroundDuringPresentation = NO;
self.searchController.searchBar.frame = CGRectMake(self.searchController.searchBar.frame.origin.x, self.searchController.searchBar.frame.origin.y, self.searchController.searchBar.frame.size.width, 44.0);
self.tableView.tableHeaderView = self.searchController.searchBar;
@tommypeps
tommypeps / .m file
Created May 1, 2016 15:51 — forked from ebinnion/.m file
Add polygon overlay to mapkit iOS
- (MKOverlayView *)mapView:(MKMapView *)mapView viewForOverlay:(id<MKOverlay>)overlay
{
if ([overlay isKindOfClass:[MKPolygon class]])
{
MKPolygonView* aView = [[MKPolygonView alloc]initWithPolygon:(MKPolygon*)overlay];
aView.fillColor = [[UIColor cyanColor] colorWithAlphaComponent:0.2];
aView.strokeColor = [[UIColor blueColor] colorWithAlphaComponent:0.7];
aView.lineWidth = 3;
return aView;
}
@tommypeps
tommypeps / docker-install-rpi3.md
Created August 12, 2018 17:40 — forked from tyrell/docker-install-rpi3.md
Installing latest Docker on a Raspberry Pi 3

Introduction

I wrote this gist to record the steps I followed to get docker running in my Raspberry Pi 3. The ARM ported debian version (Jessie) comes with an old version of docker. It is so old that the docker hub it tries to interact with doesn't work anymore :)

Hopefully this gist will help someone else to get docker running in their Raspberry Pi 3.

Installation

From original instructions at http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/

myfunctionTest() {
#read from pipeline
while read data; do
line=$data
echo line
done
}
myfunctionTest
extension UIWindow {
/// Fix for http://stackoverflow.com/a/27153956/849645
func set(rootViewController newRootViewController: UIViewController, withTransition transition: CATransition? = nil) {
let previousViewController = rootViewController
if let transition = transition {
// Add the transition
layer.add(transition, forKey: kCATransition)