Skip to content

Instantly share code, notes, and snippets.

View trfiladelfo's full-sized avatar

Thiago Filadelfo trfiladelfo

View GitHub Profile
@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 / 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
@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 :
-- Standard awesome library
require("awful")
require("awful.autofocus")
require("awful.rules")
-- Theme handling library
require("beautiful")
-- Notification library
require("naughty")
require("vicious")
@trfiladelfo
trfiladelfo / main.c
Created December 10, 2014 17:38
GTK FullScreen Widget
#include <stdlib.h>
#include <gtk/gtk.h>
int main(int argc, char** argv) {
// GtkWidget *window;
// gtk_init(&argc, &argv);
//
// window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
// gtk_widget_show(window);