Skip to content

Instantly share code, notes, and snippets.

View Bernardoow's full-sized avatar

Bernardo Gomes Bernardoow

  • Belo Horizonte - Brazil
View GitHub Profile
import betamax
from betamax.fixtures import unittest
import requests
def function():
response = requests.get('https://httpbin.org/get')
return response.json().get('url')
@Bernardoow
Bernardoow / gist:fff41d366e7fc192da00755585a25db2
Created February 20, 2018 09:07 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
def _send_post(self, url, params, headers):
req = urllib2.Request(url, json.dumps(params), headers)
response = urllib2.urlopen(req)
result = response.read()
@Bernardoow
Bernardoow / ExternalCSS.elm
Created January 30, 2017 15:46
Load external CSS in Elm
{--
You *can* load an external CSS file in Elm, but currently,
in Pure Elm that means adding a style element to the body instead of the head.
It does cause a flash of unstyled content, so I think it's only useful
for testing in Reactor.
--}
import Html exposing (..)
@Bernardoow
Bernardoow / example.html
Created June 10, 2016 17:06 — forked from leonardocouy/example.html
Trigger Tap Event - Leonardo Flores
<button class="button button-balanced" id="tap1" on-tap="execute()">Tap</button>
class NB:
def __init__(self,Lista):
self.ListaDeCaminho = Lista
self.Direcao = None
self.Custo = 0
def addUmaListaDeCaminho(self,Lista):
for e in Lista:
self.ListaDeCaminho.append(e)
def addUmPasso(self,Passo):