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 / .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 / gist:166849
Created August 12, 2009 23:29
Get Source Code Through Proxy
# -*- coding: latin-1 -*-
# @Author: Thiago Holanda
# @Email: unnamedd@gmail.com
# @Date: 12/08/2009
import re
import urllib2
import sys
def getSourceCode(url):
@unnamedd
unnamedd / LoginViewController.m
Created January 27, 2012 16:04
View de login montada através do código
//
// LoginViewController.m
// Videolog
//
// Created by Thiago Holanda on 1/20/12.
// Copyright (c) 2012
//
#import "LoginViewController.h"
@unnamedd
unnamedd / LoginViewController.h
Created January 27, 2012 16:05
View de Login
//
// LoginViewController.h
// Videolog
//
// Created by Thiago Holanda on 1/20/12.
// Copyright (c) 2012
//
#import <UIKit/UIKit.h>
@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
@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 / 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 / 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 / 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 / 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: