Skip to content

Instantly share code, notes, and snippets.

View suissa's full-sized avatar
🏠
Working from home

Jean Carlo Nascimento suissa

🏠
Working from home
  • Oncorithms Institute
  • Brasil
View GitHub Profile
@suissa
suissa / fizzbuzz-node-module.js
Created July 30, 2012 03:43
node module fizzbuzz
module.exports = {
isFizz: function(n){
return !(n % 3) && (n % 5);
}
,isBuzz: function(n){
return !(n % 5) && (n % 3);
}
,isFizzBuzz: function(n){
return (!(n % 3) && !(n % 5));
}
@suissa
suissa / portscan.js
Created August 6, 2012 14:46 — forked from kaiquewdev/portscan.js
A port scan with node.js ( by Hacksparrow <http://www.hacksparrow.com> )
#!/usr/bin/env node
var net = require('net'),
host = 'localhost',
start = 1,
end = 10000,
timeout = 15000;
while ( start <= end ) {
var port = start;
@suissa
suissa / gist:3342377
Created August 13, 2012 16:30 — forked from kaiquewdev/gist:2655801
PhantomJS Screenshot
var page = new WebPage(),
address, output, size;
address = "http://www.metachunk.com/";
width = 1024; height = 600;
output = "./screenshots/wat-"+width+"X"+height+".png";
page.viewportSize = { width: width, height: height };
if (phantom.args.length === 3 && phantom.args[1].substr(-4) === ".pdf") {
@suissa
suissa / MongoActiveRecord.php
Created August 16, 2012 19:22 — forked from diguinhorocks/Client.php
MongoDB Active Record (Basic)
<?php
require_once('MongoFactory.php');
class MongoActiveRecord extends MongoFactory{
private $model;
private $statement;
private $class;
private $className;
@suissa
suissa / index.html
Created September 12, 2012 04:06
Experimental CSS3 3D scroll behavior
<section id="info">
<header>
<hgroup>
<h1>FoldScroll</h1>
<h2>Experimental CSS 3D scroll behavior</h2>
</hgroup>
<a href="https://github.com/soulwire/FoldScroll/zipball/master">Download</a>
<a href="https://github.com/soulwire/FoldScroll">View on Github</a>
</header>
<aside>
@suissa
suissa / index.html
Created September 12, 2012 04:07
Works better in webkit, buggy in FF, flat in IE. Inspired by http://neography.com/experiment/circles/solarsystem/ and http://nicolasgallagher.com/css-pseudo-element-solar-system/demo/ [update] Added some basic responsive styles, github repo can be found
<body class="opening hide-UI view-2D zoom-large data-close controls-close">
<div id="navbar">
<a id="toggle-data" href="#data"><i class="icon-data"></i>Data</a>
<h1>3D CSS Solar System</h1>
<a id="toggle-controls" href="#controls"><i class="icon-controls"></i>Controls</a>
</div>
<div id="data">
<a class="sun" title="sun" href="#sunspeed">Sun</a>
<a class="mercury" title="mercury" href="#mercuryspeed">Mercury</a>
<a class="venus" title="venus" href="#venusspeed">Venus</a>
@suissa
suissa / module.less
Created September 21, 2012 22:25 — forked from samuelmesq/element.less
Less element declaration pattern
.element{
// properties
width: 100%;
height: 50px;
// mixins
.verticalGradient(#ffffff, #000000);
.boxSizing();
// modifiers
&.small{
@suissa
suissa / mussum-ipsum.sublime-snippet
Created October 2, 2012 19:17 — forked from zenorocha/mussum-ipsum.sublime-snippet
Mussum Ipsum - Snippet para Sublime Text
<!-- Fonte: mussumipsum.com -->
<snippet>
<content><![CDATA[
Mussum ipsum cacilds, vidis litro abertis. Consetis adipiscings elitis. Pra lá , depois divoltis porris, paradis. Paisis, filhis, espiritis santis. Mé faiz elementum girarzis, nisi eros vermeio, in elementis mé pra quem é amistosis quis leo. Manduma pindureta quium dia nois paga. Sapien in monti palavris qui num significa nadis i pareci latim. Interessantiss quisso pudia ce receita de bolis, mais bolis eu num gostis.
Suco de cevadiss, é um leite divinis, qui tem lupuliz, matis, aguis e fermentis. Interagi no mé, cursus quis, vehicula ac nisi. Aenean vel dui dui. Nullam leo erat, aliquet quis tempus a, posuere ut mi. Ut scelerisque neque et turpis posuere pulvinar pellentesque nibh ullamcorper. Pharetra in mattis molestie, volutpat elementum justo. Aenean ut ante turpis. Pellentesque laoreet mé vel lectus scelerisque interdum cursus velit auctor. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ac mauris lectus, non scelerisque augu
@suissa
suissa / phpexcel_parser
Created October 16, 2012 19:53
Xls parser with PHP getting many sheets
<?php
/**
* PHPExcel
*
* Copyright (C) 2006 - 2012 PHPExcel
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
@suissa
suissa / gist:3940642
Created October 23, 2012 18:38 — forked from benschwarz/index.html
Using ARIA roles with <header>, <footer> and <aside>
<!doctype html>
<html>
<body>
<header role="banner">
<a href="/" rel="home">My company</a>
<nav role="navigation">
<a href="/about">About</a>
<a href="/contact">Contact</a>
</nav>
</header>