Skip to content

Instantly share code, notes, and snippets.

View cironunes's full-sized avatar
🎯
Focusing

Ciro Nunes cironunes

🎯
Focusing
View GitHub Profile
@cironunes
cironunes / fibonacci.js
Created September 7, 2011 12:21
Fibonacci number script
var Fibonacci = function () {
//private
var nums = [0,1];
return {
pushNumbers: function (q) {
//check if value pass to this method is a number
//if not set it to 0
q = typeof q === 'number' ? q : 0;
@cironunes
cironunes / simple_inheritance.js
Created February 2, 2012 09:22
Simple inheritance example
function inherit( Parent, Child ) {
Child.prototype = new Parent();
}
function Car( name ) {
this.name = name;
}
Car.prototype.drive = function () {
return 'Driving a ' + this.name + ' like a boss';
@cironunes
cironunes / LICENSE.txt
Created February 12, 2012 15:57 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
@cironunes
cironunes / parallax.html
Created March 1, 2012 16:30 — forked from felquis/parallax.html
Mouse Parallax Effect
<!DOCTYPE HTML>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<title>Mouse Parallax Effect</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div id="parallax">
<img class="parallax-item" src="http://bymarina.com.br/wp-content/uploads/2011/01/sol2.jpg" width="150">
@cironunes
cironunes / gist:2417765
Created April 19, 2012 01:37
sexy image replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@cironunes
cironunes / Railscast2.tmTheme
Created June 21, 2012 13:36 — forked from smlombardi/Railscast2.tmTheme
Modified version of Railscast theme for Textmate/Sublime Text 2
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Railscasts 2</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
@cironunes
cironunes / dabblet.css
Created June 25, 2012 15:54
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@cironunes
cironunes / gist:3015471
Created June 29, 2012 03:22 — forked from alexsandro-xpt/gist:3015464
Algoritmo genético
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace AG
{
public class Pais
@cironunes
cironunes / git-gh-pages.sh
Created September 18, 2012 14:46
Working in git-extras: git gh-pages
#!/bin/sh
echo 'setting up gh-pages'
echo '-------------------'
echo 'Tell me your github account username: '
read username
echo 'Now, tell me your repository name: '
read repository
@cironunes
cironunes / observer-pattern.md
Created March 22, 2013 15:04
Observer Pattern e a história do surgimento do fogueteiro nas favelas.

A história do fogueteiro (Observer Pattern)

No morro, os cara que tinha conceito, volta e meia acordava com a policia na cara.

O que pensaro: "ai os coxinha ta colano aqui, nor precisa de um jeito de ser avisado quando os eles tiver subindo o morro."

Foi ai que surgiu o fogueteiro, sem perspectiva de vida nenhuma, tinha 5 irmãs problema nas pernas, o pai morreu e mãe não pode trabalhar.

Então o fogueteiro virou o chefe da casa.