Skip to content

Instantly share code, notes, and snippets.

View trfiladelfo's full-sized avatar

Thiago Filadelfo trfiladelfo

View GitHub Profile
// Macros for the top and bottom colors of the gradient
#define kGradientTopColor {0.0f/255.0f, 0.0f/255.0f, 0.0f/255.0f, 1.0f}
#define kGradientBottomColor {209.0f/255.0f, 209.0f/255.0f, 209.0f/255.0f, 1.0f}
// Macro for the area that should be covered by the gradient
#define kGradientBounds self.bounds
// Customize your UIView (e.g., UIView, UILabel, UIButton, etc...) drawRect method
- (void)drawRect:(CGRect)rect
{
protected void onDraw(Canvas canvas){
super.onDraw(canvas);
// init shader
BitmapShader shader;
shader = new BitmapShader(originalBitmap, Shader.TileMode.CLAMP, Shader.TileMode.CLAMP);
// init paint
Paint paint = new Paint();
paint.setAntiAlias(true);
#!/bin/bash
# encoding: utf-8
##################################################
# Variaveis #
##################################################
# Nome do Computador
HOSTN=Arch-VM
# Localização. Verifique o diretório /usr/share/zoneinfo/<Zone>/<SubZone>
#check java
java -version
#download last version
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/kepler/R/eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz&r=1
#extract package
tar xvf <foldername>
#move
/*
* Copyright (C) 2013 Tomáš Procházka
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
// .h
@interface AMPNavigationBar : UINavigationBar
@property (nonatomic, assign) CGFloat extraColorLayerOpacity UI_APPEARANCE_SELECTOR;
@end
// .m
package net.hausherr.sample;
import org.apache.http.client.CookieStore;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.conn.routing.HttpRoutePlanner;
import org.apache.http.conn.scheme.PlainSocketFactory;
import org.apache.http.conn.scheme.Scheme;
import org.apache.http.conn.scheme.SchemeRegistry;
import org.apache.http.conn.ssl.SSLSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
@trfiladelfo
trfiladelfo / 0_reuse_code.js
Created June 2, 2014 20:01
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@trfiladelfo
trfiladelfo / .htaccess
Created June 5, 2014 14:44
htaccess para CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f