Skip to content

Instantly share code, notes, and snippets.

View vquaiato's full-sized avatar
:octocat:
am I working?

Vinicius Quaiato vquaiato

:octocat:
am I working?
View GitHub Profile
@vquaiato
vquaiato / foreach_with_index.cs
Created May 15, 2015 22:27
foreach with index in C#
foreach ( var it in someCollection.Select((x,i) => new { Value = x, Index=i }) )
{
if ( it.Index > SomeNumber) {// }
}
//or
public static void Each<T>( this IEnumerable<T> ie, Action<T, int> action )
{
var i = 0;
@vquaiato
vquaiato / papo_experiencia.txt
Created May 24, 2020 03:27
Um papo sobre experiência na live
senior é quem tem cicatriz
Experiência
- estudos
- Orientação a Objetos
- Padrões
- Design Patterns
- Padrões de arquitetura de aplicações
- Design de código
@vquaiato
vquaiato / scrapper.go
Last active July 2, 2020 00:25
Scrapper/monitor a PC build price on https://meupc.net
package main
import (
"fmt"
"log"
"os/exec"
"regexp"
"github.com/gocolly/colly/v2"
)
{
nome: itens[0].receita.nome,
...
ingredientes: //aquele map vai aqui
...
} as ReceitaCompleta
@vquaiato
vquaiato / foo.ts
Created May 26, 2020 00:21
mapping in TS
items.map((item) => {
return {
nome: item.nome,
quantidade: item.quantidade,
unidade: item.unidade
} as Ingrediente
});
@vquaiato
vquaiato / programacao-funcional.md
Last active May 25, 2020 01:24
Como venci o medo e comecei a estudar (e entender) Programação Funcional

Como venci o medo e comecei a estudar (e entender) Programação Funcional

@vquaiato
vquaiato / hello_array.cpp
Created May 22, 2020 04:36
passing arrays to functions cpp
#include <iostream>
#include <vector>
#include <string>
using namespace std;
void foo(string meu_array[], int size)
{
for(int i = 0; i < size; i++){
cout << " " << meu_array[i];
@vquaiato
vquaiato / ribbon.css
Created June 19, 2012 19:48
simple css ribbon
/*
from: http://www.red-team-design.com/css-ribbons
*/
h1{
text-align: center;
position: relative;
color: #fff;
margin: 0 -30px 30px -30px;
padding: 10px 0;
@vquaiato
vquaiato / via7solucoes.com.br_curriculos_cadastro.asp
Created January 13, 2012 20:01
BEST EVER CPF VALIDATION (brazilian person unique identifier)
//VIEW THE ORIGINAL IN: HTTP://via7solucoes.com.br/curriculos/cadastro.asp
if (document.getElementById("cpff").value != "") {
if ("024.683.681-42|922.480.201-04|041.478.491-05|023.783.799-43|981.918.021-04|027.457.339-31|011.672.181-24|002.103.331-54|062.806.499-38|025.818.191-54|859.227.301-34|032.044.441-47|889.651.631-53|041.383.129-94|203.379.149-15|011.356.831-23|001.735.480-32|046.078.089-11|032.963.821-19|000.200.191-81|892.546.431-49|708.577.921-72|007.426.349-81|013.019.741-61|014.861.641-02|924.510.809-06|396.296.431-20|029.623.411-79|600.809.221-04|035.036.771-00|761.546.531-15|408.995.359-68|007.290.370-88|848.703.891-34|009.376.861-31|950.705.401-49|024.313.891-11|040.704.951-77|880.506.021-68|651.733.761-04|024.710.931-24|058.720.126-67|006.154.761-12|283.730.318-63|423.054.629-72|033.293.281-85|967.446.851-04|029.033.781-00|372.529.091-15|036.206.831-31|019.258.291-70|020.193.161-37|993.860.621-00|014.472.001-95|022.062.551-46|066.174.159-14|996.782.091-87|003.892.131-60|029.764.421-18|731.9
@vquaiato
vquaiato / 01. Gemfile
Created September 13, 2012 04:08 — forked from schleg/01. Gemfile
Setup for Devise + Omniauth (mongoid and facebook-only)
#add this to your gemfile
gem 'mongoid'
gem 'devise'
gem "omniauth-facebook"