Skip to content

Instantly share code, notes, and snippets.

View ferbass's full-sized avatar
:octocat:
ι(`ロ´)ノ

Fernando Bass ferbass

:octocat:
ι(`ロ´)ノ
View GitHub Profile
@ferbass
ferbass / gist:1289704
Created October 15, 2011 15:25
GitIgnore for xcode 4.x
.DS_Store
build/*
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
@ferbass
ferbass / gist:1713769
Created January 31, 2012 23:27
sample twitter message with sharekit
-(IBAction)sendMessage
{
NSString *text = [NSString stringWithString:@"SUA MENSAGEM"];
SHKItem *item = [SHKItem text:text];
[SHKTwitter shareItem:item];
}
@ferbass
ferbass / gist:6911840
Created October 10, 2013 01:54
create a dashed border using CoreGraphics, in your custom view puts thats code on drawRect method.
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [[UIColor grayColor] CGColor]);
CGFloat dashes[] = {1,1};
CGContextSetLineDash(context, 0.0, dashes, 2);
CGContextSetLineWidth(context, 1.0);
@ferbass
ferbass / gist:7231889
Created October 30, 2013 12:32
Objective-C ZigZag line with CoreGraphics
- (void)drawRect:(CGRect)rect
{
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSetStrokeColorWithColor(context, [[UIColor colorWithRed:241.0/255.0 green:241.0/255.0 blue:238.0/255.0 alpha:1] CGColor]);
CGContextSetLineWidth(context, 0.6);
CGContextMoveToPoint(context, CGRectGetMinX(rect), CGRectGetMaxY(rect) - 5);
@ferbass
ferbass / gist:7239784
Last active December 27, 2015 00:39
create a circle in view using bezierpath wi
- (void)drawRect:(CGRect)rect
{
CGRect box = CGRectInset(self.bounds, self.bounds.size.width * 0.1f, self.bounds.size.height * 0.1f);
UIBezierPath *ballBezierPath = [UIBezierPath bezierPathWithOvalInRect:box];
[[UIColor whiteColor] setStroke];
[[UIColor colorWithRed:0.734 green:0.000 blue:0.000 alpha:1.000] setFill];
@ferbass
ferbass / gist:281947f23f47fb1a6011
Created July 21, 2014 16:47
Disable iTunesHelper
sudo mv /Applications/iTunes.app/Contents/MacOS/iTunesHelper.app /Applications/iTunes.app/Contents/MacOS/iTunesHelper-disable.app
@ferbass
ferbass / rounded button.swift
Last active April 26, 2016 03:38
Rounded Button in Swift
import UIKit
class RoundedButton: UIButton {
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
override func drawRect(rect: CGRect) {
let maskPath = UIBezierPath.init(roundedRect: self.bounds, cornerRadius: 5)
UIColor.clearColor().setFill()
maskPath.fill()

Keybase proof

I hereby claim:

  • I am ferbass on github.
  • I am ferbass (https://keybase.io/ferbass) on keybase.
  • I have a public key ASBIz1bPa8UBMrybqhmZAwxv_qNNUi3ROttgqhpFRc1KkAo

To claim this, I am signing this object:

@ferbass
ferbass / gist:3ecc06a8ae992365bf73
Created September 20, 2014 03:04
Xcode failed to download. Use the Purchases page to try again.
Steps:
Open Terminal.
Run the following command:
defaults write com.apple.appstore ShowDebugMenu -bool true
Relaunch the App Store.
Choose the menu item Debug → Reset Application.
@ferbass
ferbass / glossary-terms.md
Created August 28, 2019 14:27
Introduction to Self-Driving Cars - Glossary Terms

ACC: Adaptive Cruise Control

A cruise control system for vehicles which controls longitudinal speed. ACC can maintain a desired reference speed or adjust its speed accordingly to maintain safe driving distances to other vehicles.

Ego

A term to express the notion of self, which is used to refer to the vehicle being controlled autonomously, as opposed to other vehicles or objects in the scene. It is most often used in the form ego-vehicle, meaning the self-vehicle.

FMEA: Failure Mode and Effects Analysis