Skip to content

Instantly share code, notes, and snippets.

View era's full-sized avatar
🦀
Rust Rust Rust

エリアス era

🦀
Rust Rust Rust
View GitHub Profile
@era
era / functions.sh
Created May 26, 2020 18:54
Functions to save new shell functions into my dotfiles
save_alias () {
echo $1 >> ~/.functions/aliases.sh
reload
}
reload () {
source ~/.zshrc
}
save_fun () {
which $1 >> ~/.functions/dev.sh
reload

Keybase proof

I hereby claim:

  • I am era on github.
  • I am eliasjr (https://keybase.io/eliasjr) on keybase.
  • I have a public key ASBYTJcdTk47ezXluoT3POi7xCKg83H0CzceeVn9dHy0Hgo

To claim this, I am signing this object:

@era
era / auth_example.py
Created November 12, 2015 08:06
Proposing defaults auth to tapioca
tapioca_example = TapiocaExample(auth=BaseAuth(token='my_token', request_url='http://example.com')
#### INSIDE TapiocaExample #####
def __init__(self, **kwargs):
self.auth = kwargs["auth"]
def request(self):
try:
request(api.endpoint)
@era
era / Kata.exs
Last active October 18, 2015 11:04
defmodule Kata do
defp do_is_prime?(_prime, _number, is_divisible) when is_divisible, do: false
defp do_is_prime?(_prime, number, _is_divisible) when number == 1, do: true
defp do_is_prime?(prime, number, _is_divisible) do
do_is_prime?(prime, number-1, rem(prime, number) == 0)
end
def is_prime?(prime) do
do_is_prime? prime, prime-1, false
end
@era
era / The Technical Interview Cheat Sheet.md
Last active August 29, 2015 14:28 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@era
era / facebook.py
Created May 26, 2013 21:15
Classe para pegar os eventos do facebook para o android app Campinas Rock
import urllib2
import json
class Facebook:
APP_ID = ""
APP_SECRET = ""
GRAPH_URL = "https://graph.facebook.com/"
URL_GET_TOKEN = "oauth/access_token?client_id="+APP_ID+"&client_secret="+APP_SECRET+"&grant_type=client_credentials"
def __init__(self,token):
By Klaus Wuestefeld
1) Torne-se excelente.
Seja realmente bom em alguma coisa. Não fique só choramingando ou
querendo progredir às custas dos outros. Não pense q pq vc sentou 4
anos numa faculdade ouvindo um professor falar sobre software q vc
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da