Skip to content

Instantly share code, notes, and snippets.

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

Henry Hamon henryhamon

🏠
Working from home
View GitHub Profile
@dankrause
dankrause / custom-tinycore.sh
Last active February 9, 2025 03:08
Create a custom tinycore linux iso. Adjust the config at the beginning of the script, or supply a conf as the first arg. Requires xorriso.
#!/bin/bash
set -e
function cleanup() {
# clean up our temp folder
rm -rf "${TMPDIR}"
}
trap cleanup EXIT
# Retorna dados sobre o pregão
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDados.asp?CodDado=IBOV,ticker&CA=undefined
# Retorna ações e seus últimos valores negociados
http://www.bmfbovespa.com.br/Pregao-OnLine/ExecutaAcaoCarregarDados.asp?CodDado=Ticker
# Retorna o histórico do dia de um papel
http://www.bmfbovespa.com.br/Pregao-Online/ExecutaAcaoCarregarDadosPapeis.asp?CodDado=petr4
# Retorna dados de um papel
@kevin-smets
kevin-smets / iterm2-solarized.md
Last active May 13, 2025 06:11
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@sepastian
sepastian / zebra.rb
Last active January 15, 2018 07:28
Print a label on a Zebra TLP 2844 in Ruby. The printer is EPL/2 capable and connected via USB.
# Print a label on a Zebra TLP 2844 in Ruby.
# The printer is EPL/2 capable and connected via USB.
# EPL/2 reference: http://www.zebra.com/apps/dlmanager?dlp=-227178c9720c025483893483886ea54a70963bb77ca94fcc1d65ce9394326ed960e43d023beba35831d5d9bfc1740296347157b5024977a&c=gb&l=en
# https://github.com/larskanis/libusb
require 'libusb'
# Select the printer by vendor ID and product ID.
# To get a list of connected devices, use 'lsusb'.
# 0a5f:0x000a identifies the Zebra TLP 2844.
@kirkgo
kirkgo / inflections.rb
Last active June 5, 2018 19:17
Pluralization in brazilian portuguese through REGEX for Ruby on Rails
ActiveSupport::Inflector.inflections do |inflect|
inflect.plural /ao$/i, 'oes'
inflect.singular /oes$/i, 'ao'
inflect.plural /l$/i, 'is'
inflect.singular /is$/i, 'l'
inflect.plural /or$/i, 'ores'
inflect.singular /ores$/i, 'or'
end