Skip to content

Instantly share code, notes, and snippets.

@fnando
fnando / rubies.json
Created Nov 2, 2020
List of Ruby's stable releases
View rubies.json
["2.7", "2.6"]
@fnando
fnando / index.js
Last active Sep 7, 2020
Loading Stimulus.js controllers without `@stimulus/webpack-helpers` (no `_controller` suffix, no need to default export classes)
View index.js
import { Application } from "stimulus";
import "style/main.css";
const application = Application.start();
const context = require.context("./controllers", true, /\.[jt]s$/);
// Let's not follow stimulus' default name pattern.
// Instead, files can be named just as the controller. E.g. if your controller
// is called `RefreshPanel`, your source file would be
View application.rb
# frozen_string_literal: true
require_relative “boot”
require “rails”
require “active_model/railtie”
require “active_job/railtie”
require “active_record/railtie”
require “action_controller/railtie”
require “action_mailer/railtie”
@fnando
fnando / object.js
Created Oct 24, 2019
Functions to convert object keys from/to underscore/camelcase.
View object.js
function SwitchCase({ object, matcher, replacer, transformer }) {
if (object instanceof Array) {
return object.map(item =>
SwitchCase({ object: item, matcher, replacer, transformer })
);
} else if (object && object.constructor === Object) {
return Object.keys(object).reduce((buffer, key) => {
const newKey = key.replace(matcher, replacer);
buffer[newKey] = SwitchCase({
object: object[key],
@fnando
fnando / disposable.json
Created Apr 3, 2019
List of disposable email providers
View disposable.json
[
"0-attorney.com",
"0-mail.com",
"00.msk.ru",
"000777.info",
"000invaliddomain.local",
"001.igg.biz",
"0033.pl",
"0039.cf",
"0039.ga",
@fnando
fnando / README.md
Last active Aug 9, 2020
HP P1109w: changing wifi settings
View README.md

HP P1109w: Changing wifi settings

Requirements

Make sure you have httpie installed. If you're using homebrew, you can easily do it so with:

brew install httpie
View genesis_public_key
0403c3e798896281009795283fa7292c421f46126f295e24697db86d55ff93455d603e1a0039ca08985ab1d017b89c245d98210621835ea02c8f81186681cb2f4c;qmx
@fnando
fnando / .gitignore
Last active Sep 21, 2018
lumenaddr: A simple tool to generate vanity addresses for Stellar. Get an account ID with your name as the suffix.
View .gitignore
/node_modules
View gist:5ef3e7177d6143f9a1fd0cc75d93e9b0
### Keybase proof
I hereby claim:
* I am fnando on github.
* I am fnando (https://keybase.io/fnando) on keybase.
* I have a public key whose fingerprint is 36A1 2E23 89B8 0492 BF21 2455 C795 5F62 D061 15A5
To claim this, I am signing this object:
View README.txt
roles
- id
- name (e.g. Deputado Federal)
- description
allowances
- role_id
- amount
- name (e.g. Salário)
- description
You can’t perform that action at this time.