Skip to content

Instantly share code, notes, and snippets.

View erolando's full-sized avatar
🤠

Rolando Avila erolando

🤠
View GitHub Profile
@aprato
aprato / AMPNavigationBar.m
Last active July 13, 2018 00:23
Darker iOS7 translucent UINavigationBar
// .h
@interface AMPNavigationBar : UINavigationBar
@property (nonatomic, assign) CGFloat extraColorLayerOpacity UI_APPEARANCE_SELECTOR;
@end
// .m
@consti
consti / hosts
Last active May 14, 2025 15:51
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@hereswhatidid
hereswhatidid / archive-commit.bat
Last active November 25, 2022 03:55
Create a zip archive of a specific commit. The archive will be named deploy/deploy-COMMITID.zip.
setlocal enabledelayedexpansion
set var=%1
set output=
for /f "delims=" %%a in ('git diff-tree --no-commit-id --name-only -r %1^^') do ( set output=!output! "%%a" )
git archive -o update-%var:~0,7%.zip HEAD %output%
endlocal
@Sunnyztj
Sunnyztj / gist:8947661
Created February 12, 2014 00:47
google map
1.get center of map coordinate
CGPoint point = mapView.center;
CLLocationCoordinate2D coor = [mapView.projection coordinateForPoint:point];
@wwwins
wwwins / TextDemoViewController.m
Last active August 29, 2015 13:57
UITextView issues in iOS6 and iOS7
//
// TextDemoViewController.m
// TextDemo
//
// Created by wwwins on 2014/3/5.
// Copyright (c) 2014年 wwwins. All rights reserved.
//
#import "TextDemoViewController.h"
@hectoregm
hectoregm / angularfire-crud-es.md
Last active October 3, 2020 19:05
Tutorial for basic CRUD using AngularJS and Firebase

Tutorial para AngularFire (AngularJS + Firebase)

Introduccion

En este tutorial haremos uso de AnguarJS y de Firebase (esta combinacion es tambien llamada AngularFire) para implementar un CRUD basico para el ingreso de usuarios. En este tutorial se tiene como requisitos tener instalado git y tener una cuenta en Firebase

AngularJS

Es un framework MVC que esta implementado en Javascript este vive en el lado del cliente (navegador) y dado que usaremos como backend a Firebase que nos da un BD desde el cliente es solo necesario un servidor web para poder enviar HTML, CSS y el Javascript de la aplicacion. Haremos uso de un servidor web usando Node.js desde la consola para ver como va nuestra aplicacion.

@pocketkk
pocketkk / gist:e449cc89d40ce9744590
Created July 13, 2014 15:01
Swift - Add subview with transition
UIView.transitionWithView(self.view, duration: 0.5, options: UIViewAnimationOptions.TransitionNone,
animations: {self.view.addSubview(effectView)}, completion: nil)
extension UIImage {
public func imageRotatedByDegrees(degrees: CGFloat) -> UIImage {
let radiansToDegrees: (CGFloat) -> CGFloat = {
return $0 * (180.0 / CGFloat(M_PI))
}
let degreesToRadians: (CGFloat) -> CGFloat = {
return $0 / (180.0 * CGFloat(M_PI))
}
// calculate the size of the rotated view's containing box for our drawing space
@peerax
peerax / ios sqlite
Created December 15, 2014 15:33
SQlite ios Set get version
PRAGMA user_version;//Get
PRAGMA user_version = 2; //Set