Skip to content

Instantly share code, notes, and snippets.

View onlurking's full-sized avatar
:shipit:
ship it

Diogo Felix onlurking

:shipit:
ship it
View GitHub Profile
{
"always_show_minimap_viewport": true,
"caret_extra_bottom": 1,
"caret_extra_top": 1,
"caret_extra_width": 1,
"caret_style": "blink",
"color_scheme": "Packages/Colorcoder/Boxy Tomorrow (Colorcoded).tmTheme",
"detect_indentation": false,
"fade_fold_buttons": false,
"font_size": 9,
@onlurking
onlurking / til.md
Last active September 2, 2016 01:08
# TIL (Today I Learned)

TIL (Today I Learned)

Map, Filter, Reduce and Arrow Functions w/ Javascript

Inspiration

const numbers = [1, 2, 3, 4];
const doubled = numbers.map(number => number * 2)
console.log("The doubled numbers are: ", doubled); // [2, 4, 6, 8]
@onlurking
onlurking / fizzbuzz.md
Last active September 6, 2016 01:01
Python FizzBuzz Oneliners
for x in ("FizzBuzz" if num % 15 == 0 else "Fizz" if num % 3 == 0 else "Buzz" if num % 5 == 0 else num for num in range(1,101)): print(x)
for x in ["fizzbuzz" if not x % 15 else "buzz" if not x % 5 else "fizz" if not x % 3 else str(x) for x in range(100)]: print(x)
{
"always_show_minimap_viewport": true,
"caret_extra_bottom": 1,
"caret_extra_top": 1,
"caret_extra_width": 1,
"caret_style": "blink",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Tomorrow.tmTheme",
"detect_indentation": false,
"fade_fold_buttons": false,
"font_size": 11,
#! /usr/bin/env hy
(import requests
string
[bs4 [BeautifulSoup]]
[sys [argv]])
(defn get_page [link]
(-> (. (.get requests link) text)

Grab the nteract

wget https://github.com/nteract/nteract/releases/download/v0.0.15/nteract-0.0.15-linux.tar.gz
tar -xvf "nteract-0.0.15-linux.tar.gz"

Install IPython and Hy

sudo pip3 install hy ipython ipykernel
python3 -m ipykernel install --user
@onlurking
onlurking / errata-hy.md
Last active December 20, 2017 17:26
Errata: Cara tem um Lisp no seu Python..? (Ou uma introdução sobre Hy)

ERRATA, Cara tem um Lisp no seu Python..?

Ou uma introdução sobre Hy

Eu submeti a proposta de fazer uma palestra no Lambda I/O Sampa Meetup falando um pouco sobre Hy (Um Lisp embedded no Python), uma linguagem que eu vinha brincando um pouco nos finais de semana, é meu primeiro contato com Lisp, e vinha sendo bem confortável já que eu conseguia fazer algumas coisas úteis com ela, é interop com Python, e eu estava reescrevendo alguns de meus código que usam BeautifulSoup e Requests com sintaxe Lisp.

O que deu bom

Esta foi a primeira palestra que eu dei e foi uma experiência absurda, eu nunca aprendi tanto em tão pouco tempo com meus próprios erros.

Conheci muita gente pessoalmente que só conhecia pela internet, pensa numa galera gente boa.. na moral, vocês são fera! Obrigado por tudo.