Skip to content

Instantly share code, notes, and snippets.

Sergio Vilar sergiovilar

Block or report user

Report or block sergiovilar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8286787
<% for(var i = 0; i <= 100; i++){ %>
<%=i%><br />
<% } %>
View teste.js
var a = "Snow White and Batman were hanging out at the bus stop, waiting to go to the shops. There was a sale on and both needed some new threads. You've never really liked Batman. You walk up to him.";
console.log(a);
View main.js
require.config({
paths: {
'jquery': '../bower_components/jquery/jquery',
'underscore': '../bower_components/underscore-amd/underscore',
'backbone': '../bower_components/backbone-amd/backbone',
'text': '../bower_components/requirejs-text/text',
'templates': '../templates'
},
@sergiovilar
sergiovilar / style.less
Created Oct 26, 2013
Comparsion between LESS and SCSS
View style.less
.background-preto{
background:#000;
}
#container{
.left{
.background-preto;
float:left;
View carta_a_presidente_dilma_rousseff.mkd

Olá, presidente Rousseff... eu lhe disse

Carta impressa: escrita por Maddog

Querida Presidenta Rousseff,

Eu entendo que você está irritada com meu país, os Estados Unidos da América, porque uma de nossas agências, a Agência de Segurança Nacional (NSA), vem armazenando suas comunicações

@sergiovilar
sergiovilar / polonesa.cpp
Last active Dec 25, 2015
Conversão de expressão infixa para posfixa
View polonesa.cpp
//
// main.cpp
// Lista2
//
// Created by Sérgio Vilar on 11/10/13.
// Copyright (c) 2013 Sérgio Vilar. All rights reserved.
//
#include <iostream>
#include <stdio.h>
View arquivo.js
// Nesse arquivo eu recebo um Uncaught ScriptError no stockbrowser do Android
define(['outro_arquivo.js'], function(OutroArquivo){
var arquivo = function(){
OutroArquivo.AlgumaFuncao();
};
return arquivo;
View listas.cpp
//
// main.cpp
// ListasSequenciais
//
// Created by Sérgio Vilar on 09/09/13.
// Copyright (c) 2013 Sérgio Vilar. All rights reserved.
//
#include <iostream>
@sergiovilar
sergiovilar / localStorageSize.js
Created Aug 30, 2013
A little snippet to show the localStorage usage in javascript
View localStorageSize.js
var sum;
for(var x in localStorage){
sum +=(localStorage[x].length * 2)/1024/1024;
}
console.log(sum.toFixed(2) + ' KB');
console.log((sum/1024).toFixed(2) + ' MB');
View program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
You can’t perform that action at this time.