Skip to content

Instantly share code, notes, and snippets.

View barraponto's full-sized avatar
🏠
Working from home

Capi Etheriel barraponto

🏠
Working from home
View GitHub Profile
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'],
@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).

@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"
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(', ')}`
})
}