This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/openrc-run | |
# $Header: $ | |
start() { | |
ebegin "Starting ${SVCNAME}" | |
start-stop-daemon --start --background --exec /usr/bin/dockerd | |
eend $? | |
} | |
stop() { |
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export ZSH="$HOME/.oh-my-zsh" | |
ZSH_THEME="lambda-mod" | |
source $ZSH/oh-my-zsh.sh | |
VISUAL="nvim" | |
plugins=(git git-extras) | |
# Path Management | |
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl" | |
# Aliases for utilities |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="$PATH:$HOME/.npm-packages/bin" | |
export PATH="$PATH:$HOME/.local/bin" | |
export PATH="$PATH:$HOME/.gem/ruby/2.4.0/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function add3(x) { | |
return new Promise(resolve => { | |
setTimeout(() => { | |
resolve(x + 3); | |
}, 2000); | |
}); | |
} | |
async function t3() { | |
let x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import sys | |
import os | |
import argparse | |
import re | |
import requests | |
from subprocess import call | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from splinter import Browser | |
from bs4 import BeautifulSoup | |
import tomd | |
from html_sanitizer import Sanitizer | |
# pip install tomd splinter html-sanitizer beautifulsoup4 | |
browser = Browser( | |
'chrome', user_agent="Mozilla/5.0 (iPhone; U; CPU like Mac OS X; en)") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import count, product | |
from string import digits, ascii_lowercase, ascii_uppercase | |
from sys import stdout | |
import argparse | |
combinations = ascii_lowercase | |
parser = argparse.ArgumentParser() | |
parser.add_argument("--digits", "-d", help="include numbers", action="store_true") | |
parser.add_argument("--upper", "-u", help="include uppercase letters", action="store_true") | |
args = parser.parse_args() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
from collections import namedtuple | |
def normalize_date(ct, m = '00', s = '00'): | |
"""Return formated time_object with hour - 1, | |
and zero-filled minutes and seconds. | |
>>> normalize_date(datetime.strptime('Jun 1 2005 1:33PM', '%b %d %Y %I:%M%p')) | |
Date(year=2005, month=6, day=1, hour=12, minute='00', second='00') |