Skip to content

Instantly share code, notes, and snippets.

View barraponto's full-sized avatar

Capi Etheriel barraponto

View GitHub Profile
const convertCurrency = (from, to, amount) => {
const countries = getCountries(to);
const rate = getExchangeRate(from, to);
return Promise.all([countries, rate])
.then(([countries, rate]) => {
const exchangedAmount = amount * rate
return `${amount} ${from} is worth ${exchangedAmount} ${to}. ${to} can be used in the following countries: ${countries.join(', ')}`
})
}
@barraponto
barraponto / mkp2pblocklist
Created September 4, 2017 16:23 — forked from glaszig/mkp2pblocklist
creates a blocklist for your p2p endeavors
#!/usr/bin/env sh
# inspired by https://gist.github.com/johntyree/3331662#gistcomment-1968023
#
# usage:
# mkp2pblocklist > /tmp/blockp2p.list
# or
# mkp2pblocklist | gzip -9 > /tmp/blockp2p.list.gz
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:$PATH"
@barraponto
barraponto / gh-pages-deploy.md
Created October 20, 2016 18:19 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

import random
from flatlib.datetime import Datetime
from flatlib.geopos import GeoPos
from flatlib.chart import Chart
from flatlib import const
planets = {
'sun' : ['self-expression', 'will', 'assertion'],
'moon' : ['response', 'intuition', 'feeling'],
import sys
number_of_args = len(sys.argv)
def get_int():
""" Function used to test user input as a valid integer.
If input is not a valid integer ask the user to try again"""
integer = ""
switch = False
while switch == False:
__author__ = 'Jonathan'
import random
questions = {
"strong": "Do ye like yer drinks strong?",
"salty": "Do ye like it with a salty tang?",
"bitter": "Are ye a lubber who likes it bitter?",
"sweet": "Would ye like a bit of sweetness with yer poison?",
"fruity": "Are ye one for a fruity finish?"
@barraponto
barraponto / Copa2014.py
Last active May 20, 2016 02:32 — forked from fmasanori/Copa2014.py
Pythonic sum of 2014 World Cup spendings
# coding: utf-8
from urllib.request import urlopen
from xml.etree import ElementTree
class Budget(object):
'''2014 World Cup budget parser.'''
def __init__(self, data_url):
'''Parses XML from data_url.'''
<?php
// $Id$
/**
* @file
* Outputs block with simple links to login / logout.
*/
/**
* Implementation of hook_block_info()
@barraponto
barraponto / contrato-enois.md
Last active August 29, 2015 13:57 — forked from malarkey/Contract Killer 3.md
Contrato Consultoria em Desenvolvimento Web: Énois

Entre nós, Hackatoa, CNPJ 13.941.346/0001-36
E vocês Énois Inteligência Jovem, CNPJ 15.001.379/0001-21

Sumário:

Nós vamos fazer nosso melhor para cumprir com as suas demandas e atender às suas expectativas, mas é importante deixar as coisas escritas pra que a gente saiba o quê é o quê, quem tem que fazer o quê e quando, e o que acontece se algo der errado. Neste contrato vocês não vão encontrar nenhum termo legal complicado ou longos parágrafos de texto ilegível. Não temos vontade nenhuma de enganá-los fazendo com que assinem algo de que vão se arrepender no futuro. O que nós queremos é o que é melhor para ambas as partes, agora e no futuro.

Então resumindo:

Vocês, (Enóis), localizados na rua João Brícola, 24, São Paulo/SP estão contratando a nós (Hackatoa), localizados na alameda Eduardo Prado, 835, São Paulo/SP para prestar consultoria no desenvolvimento de uma plataforma aberta para cursos online, pelo valor estimado de R$ 1200,00 por mês, co


title: Terminal colors for tmux, vim, and weechat tags: terminal, command line, vim, tmux, solarized date: 13 Mar 2013 13:26 AST image: htop.png

Solarized Terminal Colors