Skip to content

Instantly share code, notes, and snippets.

View froi's full-sized avatar
💭
Moving to Gitlab and Codeberg.org

Froilán Irizarry Rivera froi

💭
Moving to Gitlab and Codeberg.org
View GitHub Profile
@froi
froi / README.md
Last active July 30, 2020 01:55
playing-with-etajs

This is a quick and simple example on how we can use a template engine to create markdown strings for use in GitHub issues or Jira ticket.

Eta.js

Eta.js is a templating engine that embbeds Javascript syntax into the template it self. It seems super lite weight.

Why use it

When working with issues and PRs, a ton of the code we do are the message templates themselves. I think that extracting this into a template engine will clean up the business logic from the view logic (sound familiar 😉).

@froi
froi / get-repo-labels-generator.js
Last active July 8, 2020 22:17
Quick example of how to use a async generator to get a repository's labels
const { Octokit } = require('@octokit/rest');
const { throttling } = require('@octokit/plugin-throttling');
const OctokitThrottling = Octokit.plugin(throttling);
const octokit = new OctokitThrottling({
auth: "your-token",
throttle: {
onRateLimit: (retryAfter, options) => {
octokit.log.warn(
@froi
froi / find-bin-alias.sh
Created July 27, 2020 16:36
Shell alias to find binary file extensions.
alias findbin='find . -type f -not -path "./.git/*" -exec perl -MFile::Basename -e '\''print (-T $_ ? "" : (fileparse ($_, qr/\.[^.]*/))[2] . "\n" ) for @ARGV'\'' {} + | sort | uniq'
@froi
froi / .gitconfig
Last active July 22, 2022 19:12
Global Git configuration and template
[user]
name = Froilán Irizarry Rivera
email =
signingkey =
[core]
excludesfile = ~/.gitignore_global
editor = nano
quotepath = false
@froi
froi / candidate-eval-template.md
Last active April 17, 2022 20:32
Template to help me evaluate a candidate

Interview notes for {{candidate name}}

Technical submission

Submission doc

Things to evaluate

Documentation

@froi
froi / test-gpg.sh
Last active June 30, 2021 04:34
Command to test gpg key
#!/usr/bin/env sh
echo "1234" | gpg --no-use-agent -o /dev/null --local-user <KEYID> -as - && echo "The correct passphrase was entered for this key"
@froi
froi / documentation-pr-template.md
Created January 3, 2022 20:57
Documentation section of a pull request template

Documentation

Creating and maintaining documentation is increadibly important. When needed, as part of this PR you need to tackle this too.

  • Documentation was created. URL to docs:
  • Documentation was updated. URL to docs:
  • Changes did not need documentation updates.
@froi
froi / pull_request_template.md
Last active February 23, 2022 17:59
GitHub PR template

Description

Jira and GitHub Issues

@froi
froi / cbt-helpers.sh
Last active May 25, 2022 20:48
gcp helper commands
#!/usr/bin/env zsh
# These commands can be configured somewhat in ~/.cbtrc
# full docs at https://cloud.google.com/bigtable/docs/cbt-overview#create-cbtrc
instance=""
project_id=""
table_name=""
# Delete all rows in a table
cbt -instance ${instance} \