Skip to content

Instantly share code, notes, and snippets.

View sergiogarciadev's full-sized avatar
I turn coffee into code (sometimes in bugs).

Sergio Garcia sergiogarciadev

I turn coffee into code (sometimes in bugs).
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Código de Conduta do Contribuidor

Como contribuintes e mantenedores deste projeto, e no interesse de promover uma comunidade aberta e acolhedora, nós nos comprometemos a respeitar todas as pessoas que contribuem enviando issues, requisitando funcionalidades, atualizando a documentação, enviando pull requests, patches e outras atividades.

Estamos empenhados em tornar a participação neste projeto uma experiência livre de assédio para todos, independentemente do nível de experiência, gênero, identidade de gênero e expressão, orientação sexual, deficiência, aparência pessoal, tamanho do corpo, raça, etnia, idade, orientação política, religião ou nacionalidade.

// https://buch415.github.io/game-off-2016/
// 648
setup: function () {
this.canonPosition = 48;
this.maxEnemyPosition = 790;
this.maxShootPosition = 700;
this.minShootPosition = 400;
this.currentEnemy = null;
this.enemies = [];
query UserRepositories($user: String!, $after: String!) {
repositoryOwner(login: $user) {
repositories(first: 3, after: $after) {
edges {
cursor
node {
id
name
description
hasWikiEnabled
@sergiogarciadev
sergiogarciadev / bovespa_intraday.py
Created May 19, 2016 20:38 — forked from maurobaraldi/bovespa_intraday.py
Cotações da Bovespa Intraday
#!/usr/bin/env python
from datetime import datetime
from json import loads
from time import gmtime, mktime, strptime
# LevelDict é um wrapper usando dicionário para LevelDB
# https://github.com/maurobaraldi/leveldict
from leveldict import LevelJsonDict
from requests import get
@sergiogarciadev
sergiogarciadev / python-cli.sh
Created April 27, 2016 19:02 — forked from nepsilon/3-python-module-you-can-use-on-cli.md
3 Python modules you can use directly on the CLI
# Start a local webserver to serve the file of your current directory on the LAN:
# Python version 2.x:
python -m SimpleHTTPServer
# Python version 3.x:
python3 -m http.server
#Start a local SMTP server to debug your app emails. Emails will be printed on stdout:
python -m smtpd -c DebuggingServer -n
#Parse and prettify a JSON string with:
@sergiogarciadev
sergiogarciadev / make_pi.py
Created February 22, 2016 18:02
Calculate pi up to n digits
import sys
def make_pi(digits):
def _make_pi(digits):
q, r, t, k, m, x = 1, 0, 1, 1, 3, 3
count = -1
for j in range(sys.maxsize):
if count >= digits:
break
if 4 * q + r - t < m * t:
{
"always_show_minimap_viewport": true,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"draw_white_space": "all",
"font_size": 10,
"ignored_packages":
[
"Vintage"
],
(function () {
var d = time(), frames = 0;
function time() {
return parseInt(new Date() / 1000);
}
function fpsCounter() {
if (d != time()) {
console.log(frames + ' fps');
@sergiogarciadev
sergiogarciadev / gist:337cda512e5daad22547
Created July 15, 2015 16:58
Detect HTML Window Focus
var focused = false,
focusedTimeout,
lastDate;
function anim() {
clearTimeout(focusedTimeout);
focused=true;
if (!lastDate) {
lastDate = new Date();