Skip to content

Instantly share code, notes, and snippets.

View csr4mos's full-sized avatar

Cristiano Ramos csr4mos

View GitHub Profile
@isaacsanders
isaacsanders / Equity.md
Created January 21, 2012 15:32
Joel Spolsky on Equity for Startups

This is a post by Joel Spolsky. The original post is linked at the bottom.

This is such a common question here and elsewhere that I will attempt to write the world's most canonical answer to this question. Hopefully in the future when someone on answers.onstartups asks how to split up the ownership of their new company, you can simply point to this answer.

The most important principle: Fairness, and the perception of fairness, is much more valuable than owning a large stake. Almost everything that can go wrong in a startup will go wrong, and one of the biggest things that can go wrong is huge, angry, shouting matches between the founders as to who worked harder, who owns more, whose idea was it anyway, etc. That is why I would always rather split a new company 50-50 with a friend than insist on owning 60% because "it was my idea," or because "I was more experienced" or anything else. Why? Because if I split the company 60-40, the company is going to fail when we argue ourselves to death. And if you ju

@ografael
ografael / combo_dinamico.html
Created March 14, 2012 15:12
Carregar combo com JQuery - Cidades e Estados
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<script type="text/javascript" src="jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function () {
$.getJSON('estados_cidades.json', function (data) {
@rxaviers
rxaviers / gist:7360908
Last active June 26, 2024 20:59
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@lucianobragaweb
lucianobragaweb / botaotopo.html
Created November 12, 2013 15:06
Botão Voltar ao topo com deslize suave
<div id="voltarTopo">
<a href="#" id="subir">Topo</a>
</div>
@douglasjunior
douglasjunior / exemploJson.php
Last active August 20, 2022 17:23
Exemplo de consulta no banco de dados e retorno de JSON utilizando PHP e MySQL.
<?php
header('Content-Type: application/json');
header('Character-Encoding: utf-8');
// recebe os parâmetros
$QTD = (int) filter_input(INPUT_GET, 'qtd', FILTER_VALIDATE_INT);
$LAT = (float) filter_input(INPUT_GET, 'lat', FILTER_VALIDATE_FLOAT);
$LNG = (float) filter_input(INPUT_GET, 'lng', FILTER_VALIDATE_FLOAT);
if ($LAT && $LNG) {
@msdzero
msdzero / chartjs_jquery_ajax_example.html
Created March 3, 2017 01:08
Chart.js example using Jquery Ajax to populate labels and data
<canvas id="myChart" width="400" height="100"></canvas>
<script src="/js/Chart.min.js"></script>
<script>
$(function () {
var ctx = document.getElementById("myChart").getContext("2d");
// examine example_data.json for expected response data
var json_url = "example_data.json";
// draw empty chart
<switch expr="{{ @value }}">
<case value="show-text" break="TRUE">
text-block
</case>
.
.
.
<default>
message
</default>
//https://habr.com/post/213515/
// This works on all devices/browsers, and uses IndexedDBShim as a final fallback
var indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB || window.shimIndexedDB,
IDBTransaction = window.IDBTransaction || window.webkitIDBTransaction || window.msIDBTransaction,
baseName = "baseName",
storeName = "storeName";
function logerr(err){
console.log(err);
@evertonstrack
evertonstrack / service-wroker.js
Created July 31, 2018 22:14
service-wroker.js
// Criando um nome para o arquivo de cache
const staticCache = "meu-site-2018-07-31-21-13";
// Lista de arquivos que devem ser cacheados
const files = [
'/',
'/sobre',
'/contato',
'/images/logo.jpg',
'/assets/styles/main.min.css',
@Braytiner
Braytiner / monetarios-chart.js
Last active January 5, 2021 05:40
Valores monetários PT-BR para chart.js
/*
Adding a ‘thousands’ separator to ChartJS’s Y axis and tooltips
I learned the toLocaleString() method for adding thousands separators from this Github issue (https://github.com/chartjs/Chart.js/issues/411)
These options in your options config will add a thousands separator to your tooltips and yAxes.
*/
options: {
tooltips: {
callbacks: {