Skip to content

Instantly share code, notes, and snippets.

View trfiladelfo's full-sized avatar

Thiago Filadelfo trfiladelfo

View GitHub Profile
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 / index.html
Last active August 29, 2015 13:56
CSS Accordion
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Accordian</title>
<meta name="description" content="">
@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 / main.c
Last active August 29, 2015 14:02
Buzzer + Arduino = Mario Bros Theme - https://www.youtube.com/watch?v=F1PZXVU9Pro
int melodia[] = {660,660,660,510,660,770,380,510,380,320,440,480,450,430,380,660,760,860,700,760,660,520,580,480,510,380,320,440,480,450,430,380,660,760,860,700,760,660,520,580,480,500,760,720,680,620,650,380,430,500,430,500,570,500,760,720,680,620,650,1020,1020,1020,380,500,760,720,680,620,650,380,430,500,430,500,570,585,550,500,380,500,500,500,500,760,720,680,620,650,380,430,500,430,500,570,500,760,720,680,620,650,1020,1020,1020,380,500,760,720,680,620,650,380,430,500,430,500,570,585,550,500,380,500,500,500,500,500,500,500,580,660,500,430,380,500,500,500,500,580,660,870,760,500,500,500,500,580,660,500,430,380,660,660,660,510,660,770,380};
int duracaodasnotas[] = {100,100,100,100,100,100,100,100,100,100,100,80,100,100,100,80,50,100,80,50,80,80,80,80,100,100,100,100,80,100,100,100,80,50,100,80,50,80,80,80,80,100,100,100,100,150,150,100,100,100,100,100,100,100,100,100,100,150,200,80,80,80,100,100,100,100,100,150,150,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,100,150,150,100,100,100,100,1
@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
@trfiladelfo
trfiladelfo / RoboActionBarActivity.java
Last active August 29, 2015 14:02
roboguice-appcompat
package org.roboguice.appcompat;
import java.util.HashMap;
import java.util.Map;
import roboguice.RoboGuice;
import roboguice.activity.event.OnActivityResultEvent;
import roboguice.activity.event.OnConfigurationChangedEvent;
import roboguice.activity.event.OnContentChangedEvent;
import roboguice.activity.event.OnCreateEvent;
@trfiladelfo
trfiladelfo / FileWriter.php
Created June 13, 2014 00:42
Upload de arquivos no cakephp...
<?php
App::uses('HttpSocket', 'Network/Http');
App::uses('File', 'Utility');
App::uses('Folder', 'Utility');
class FileWriter {
public function write($image=array(), $filename=null) {
@trfiladelfo
trfiladelfo / gulpfile.js
Created July 27, 2014 01:01
Gulp, arquivo de configuração
/********************************************************************
1. DEPENDÊNCIAS
********************************************************************/
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
minifycss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
@trfiladelfo
trfiladelfo / readme
Created November 6, 2014 17:52
CD-ROM is not detected in Debian USB installer
Recently, I was installing Debian from USB Drive. You know nowadays nobody want to use cd-rom.. I remember past years installing floppy disk…. after from cd-rom….but it is either USB or PXE. It is very easy and fast. So, back to the subject, I use the software Unetbootin to create a USB image. It was working well with others versions of Debian. I boot with USB and the installation was going well when suddenly I get error saying the CD-ROM is not detected and unable to continue the installation.
After few trick and research, I found the solution.
Version used :
Debian version 6.0.6 Release 29 Sept. 2012
Unetbootin version 5.75
First of all, in your debian installation, got to console mode :