Skip to content

Instantly share code, notes, and snippets.

View rbreve's full-sized avatar

Roberto Brevé rbreve

  • Finland
View GitHub Profile
@rbreve
rbreve / Privacy.txt
Created December 18, 2017 22:37
facebook voto social privacidad
Términos de Servicio de Voto Social™
El siguiente es un documento legal que explica como cuidamos tus datos y los términos de servicio cuando utilizas Voto Sociual. Gracias por tu confianza.
POLÍTICA DE PRIVACIDAD
Última Actualización: Diciembre 01, 2017
INTRODUCCIÓN
Bienvenido a Voto Sociual, un servicio en Internet ("El Servicio" o el "Website") proveído por Voto Social ("votosocial.org"). Respetamos su privacidad y queremos que sepa qué información recolectamos sobre usted y qué hacemos con esa información. La siguiente Política de Privacidad fue creada para ayudarlo a entender cómo será usada la información que usted provee a votosocial.org.com. Esta Política de Privacidad aplica para toda la información que recolectamos sobre usted. Por favor sepa que votosocial.org puede contener hipervínculos a otros sitios de Internet y ocasionalmente estos sitios podrían compartir la marca votosocial.org o la marca de uno de nuestros afiliados. Sitios que están conectados a El Servicio o poseen la marca de votosoc
@rbreve
rbreve / tapnode.swift
Created September 28, 2017 22:20
Add tap gesture recognizer to scnnode
//Create TapGesture Recognizer
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap(rec:)))
//Add recognizer to sceneview
sceneView.addGestureRecognizer(tapRec)
//Method called when tap
@objc func handleTap(rec: UITapGestureRecognizer){
@rbreve
rbreve / rotate.swift
Created September 28, 2017 22:16
Rotate SCNNode by 90 degrees
node.localRotate(by: SCNQuaternion(x: 0, y: 0, z: 0.7071, w: 0.7071))
axis = transform.up;
pos += transform.right * Time.deltaTime * MoveSpeed;
transform.position = pos + axis * Mathf.Sin (Time.time * frequency ) * magnitude;
@rbreve
rbreve / tapgesture.swift
Last active July 17, 2017 06:14
Add Gesture Recognizer Swift 3
func addTapGesture(){
//creates tap gesture recognizer
let tapRecognizer = UITapGestureRecognizer(target: self, action: #selector(handleTap(recognizer:)))
//add recognizer to a view
view.addGestureRecognizer(tapImageRec)
}
//function called when tap detected
@rbreve
rbreve / cancel.m
Created March 7, 2017 23:25
Change UIImagePickerController Cancel Button Color
[[UIBarButtonItem appearanceWhenContainedIn:[UIImagePickerController class], nil] setTitleTextAttributes:@{ NSFontAttributeName : [UIFont fontWithName:@"AmericanTypewriter" size:14.0] } forState:UIControlStateNormal];
@rbreve
rbreve / .gitignore
Created February 14, 2017 21:15
Git Ignore
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
@rbreve
rbreve / .gitignore
Created February 14, 2017 21:15
Git Ignore
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
@rbreve
rbreve / download.m
Created November 25, 2016 16:04
download video
-(void) downloadVideo:(NSString *) urlToDownload
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSLog(@"Downloading Started");
NSURL *url = [NSURL URLWithString:urlToDownload];
NSData *urlData = [NSData dataWithContentsOfURL:url];
if ( urlData )
{
NSString *outputURL = NSTemporaryDirectory();
@rbreve
rbreve / back.m
Created November 11, 2016 00:12
Add custom title to the back button on a navigationBar iOS
UIBarButtonItem *back = [[UIBarButtonItem alloc] initWithTitle:@"CustomText" UIBarButtonItemStylePlain target:self action:nil];
back.tintColor = [UIColor themeColor];
self.navigationController.navigationBar.topItem.backBarButtonItem = back;