Skip to content

Instantly share code, notes, and snippets.

View hebertialmeida's full-sized avatar
✈️

Heberti Almeida hebertialmeida

✈️
View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@manmal
manmal / UIImageView+AFNetworkingFadeInAdditions.h
Last active August 27, 2017 17:31
Very minimalistic fade-in implementation for AFNetworking's UIImageView category. Thanks to @myellow and @merowing_.
#import <AFNetworking.h>
@interface UIImageView (AFNetworkingFadeInAdditions)
- (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage fadeInWithDuration:(CGFloat)duration;
@end
@mattt
mattt / uiappearance-selector.md
Last active March 19, 2024 12:52
A list of methods and properties conforming to `UIAppearance` as of iOS 12 Beta 3

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep UI_APPEARANCE_SELECTOR ./*     | \
  sed 's/NS_AVAILABLE_IOS(.*)//g'     | \
  sed 's/NS_DEPRECATED_IOS(.*)//g'    | \
  sed 's/API_AVAILABLE(.*)//g'        | \
  sed 's/API_UNAVAILABLE(.*)//g'      | \
 sed 's/UI_APPEARANCE_SELECTOR//g' | \
@johanneswuerbach
johanneswuerbach / .travis.yml
Last active May 14, 2024 03:50
Deploy an iOS app to testflight using Travis CI
---
language: objective-c
before_script:
- ./scripts/travis/add-key.sh
after_script:
- ./scripts/travis/remove-key.sh
after_success:
- ./scripts/travis/testflight.sh
env:
global:
@rat
rat / noip.ino
Created September 10, 2013 02:26
void UpdateNoIP(){
EthernetClient client;
if(client.connect("dynupdate.no-ip.com", 80)){
Serial.println("Conectando com No-IP");
client.println("GET /nic/update?hostname=SUA URL HTTP/1.0");
client.println("Host: dynupdate.no-ip.com");
client.println("Authorization: Basic Senha em Base64");
client.println("User-Agent: Arduino Client/1.0 dr.renatotavares@gmail.com");
client.println();
@hebertialmeida
hebertialmeida / gist:7548793
Created November 19, 2013 17:09
Set Keyboard Appearance of UISearchBar, iOS 5 to iOS 7
- (void)customKeyboardOnSearchBar:(UISearchBar *)searchBar
{
for(UIView *subView in searchBar.subviews) {
if([subView conformsToProtocol:@protocol(UITextInputTraits)]) {
[(UITextField *)subView setKeyboardAppearance:UIKeyboardAppearanceAlert];
[(UITextField *)subView setReturnKeyType:UIReturnKeyDone];
} else {
for(UIView *subSubView in [subView subviews]) {
if([subSubView conformsToProtocol:@protocol(UITextInputTraits)]) {
[(UITextField *)subSubView setReturnKeyType:UIReturnKeyDone];
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active June 1, 2024 14:20
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@ankushg
ankushg / ArrayExtensions.swift
Created June 12, 2014 23:12
removeObject extension for Array in Swift
import Foundation
extension Array {
func indexOfObject(object : AnyObject) -> NSInteger {
return (self as NSArray).indexOfObject(object)
}
mutating func removeObject(object : AnyObject) {
for var index = self.indexOfObject(object); index != NSNotFound; index = self.indexOfObject(object) {
self.removeAtIndex(index)
@kumo
kumo / RomanNumerals.swift
Last active February 21, 2022 21:07
A simple roman numerals converter in Swift
// Playground - noun: a place where people can play
import Foundation
func toRoman(number: Int) -> String {
let romanValues = ["M", "CM", "D", "CD", "C", "XC", "L", "XL", "X", "IX", "V", "IV", "I"]
let arabicValues = [1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1]
var romanValue = ""
//
// FlagView.swift
// Bandeira Brasil
//
// Created by Danilo Altheman on 01/07/14.
// Copyright (c) 2014 Quaddro. All rights reserved.
//
import UIKit