Skip to content

Instantly share code, notes, and snippets.

View unnamedd's full-sized avatar
🇺🇦
#StandWithUkraine

Thiago Holanda unnamedd

🇺🇦
#StandWithUkraine
View GitHub Profile
@unnamedd
unnamedd / Parallaxable.swift
Created April 22, 2016 16:44 — forked from bbheck/Parallaxable.swift
Protocolo que permite que a UITableViewCell faça um efeito de parallax.
/**
Protocolo responsável por fazer o efeito de parallax nas imagens que, principalmente, são usadas como background.
É necessário chamar a função `setupParallaxInitialValues` no `awakeFromNib` da `UITableViewCell` para configurar os valores iniciais das variáveis.
Além disso, para total funcionamento do efeito, é necessário implementar algumas chamadas na `UIViewController` ou `UITableViewController` que a `tableView` está instanciada.
Chamar a função `setParallaxCellImageOffsetWithTableView` no `willDisplayCell` da `UITableViewDelegate` e para todas as células visíveis no método `scrollViewDidScroll`.
Implementação:
@unnamedd
unnamedd / puller.sh
Created April 15, 2016 12:10
script to walk through zewo flux folders and pull data from branch SNAPSHOT-2016-04-12
#!/bin/bash
for i in $(ls -d */); do
if [ ! $i = "Flux.xcodeproj/" ]; then
cd ${i%%/};
printf "\n\n##### ${i%%/}\n"
for f in $(ls -d */); do
cd ${f%%/};
printf "${f%%/}"
@unnamedd
unnamedd / main.swift
Created February 10, 2016 02:09
Basic Authentication Middleware - Zewo - Example
import Flux
var basicAuth = BasicAuthenticationMiddleware(username: "admin", password: "password")
let router = Router(middleware: logger, basicAuth) { route in
route.get("/") { request in
var content: [String: InterchangeData] = ["id": 2348, "title": "Blood Brother", "artist": "Iron Maiden"]
@unnamedd
unnamedd / .liftoffrc
Created May 18, 2015 14:49
my personal liftoffrc to create new xcode projects
############################################################################
# The following keys can be used to configure defaults for project creation
# project_name:
company: Concrete Solutions
author: Thiago Holanda
# prefix:
company_identifier: br.com.concretesolutions
############################################################################
test_target_name: UnitTests
@unnamedd
unnamedd / RemoveAccents.m
Last active January 18, 2021 23:51
Remove accents from words using Objective-C
#import <Foundation/Foundation.h>
int main(int argc, char *argv[]) {
@autoreleasepool {
NSString *start = @"CéuÁbÊrtação";
NSData *stringAsciiEncoded = [start dataUsingEncoding:NSASCIIStringEncoding allowLossyConversion:YES];
NSString *simpleString = [[NSString alloc] initWithData:asciiEncoded encoding:NSASCIIStringEncoding];
NSLog(@"Valor: %@", simpleString);
}
### Keybase proof
I hereby claim:
* I am unnamedd on github.
* I am unnamedd (https://keybase.io/unnamedd) on keybase.
* I have a public key ASAzyQzrzgp9bCWJHLBsH3B3jGIXeSX5ocqP4pBslLV3fQo
To claim this, I am signing this object:
@unnamedd
unnamedd / .gitconfig
Last active March 14, 2024 13:19
Personal Git Configurations / Git Config
[core]
excludesfile = /Users/unnamedd/.gitignore
editor = code
autocrlf = false
pager = delta
[user]
name = Thiago Holanda
email = unnamedd@gmail.com
signingkey = CD1B6C70016B3BD91C38BC49F94B6756E6B6D57A
[alias]
@unnamedd
unnamedd / functions.js
Created April 25, 2012 17:49
Get Parameters from QueryString
function getParameters(qs) {
qs = qs.split("+").join(" ");
var params = {}, tokens,
re = /[?&]?([^=]+)=([^&]*)/g;
while (tokens = re.exec(qs)) {
params[decodeURIComponent(tokens[1])]
= decodeURIComponent(tokens[2]);
}
return params;
@unnamedd
unnamedd / gist:2380471
Created April 13, 2012 22:13
My Aliases
alias mygrep="clear && grep -Rni $1 --exclude=*.{js,css,log,sql,pyc,swp} $2"
alias greppy="clear && grep -Rni $1 --exclude=*.* --include=*.py $2"
alias grephtml="clear && grep -Rni $1 --exclude=*.* --include=*.html $2"
alias grepcss="clear && grep -Rni $1 --exclude=*.* --include=*.css $2"
alias grepjs="clear && grep -Rni $1 --exclude=*.* --include=*.js $2"
# find and delete
find . -name "*.pyc" | xargs rm
@unnamedd
unnamedd / .vimrc
Created April 13, 2012 05:37
Example .vimrc
" References:
" https://sites.google.com/site/bemylifeeasy/Home/vimrc
" http://www.vivaolinux.com.br/etc/.vimrc-hackwiz
" http://amix.dk/vim/vimrc.html
" http://vi-improved.org/vimrc.html
call pathogen#infect()
syntax on
filetype plugin indent on