Skip to content

Instantly share code, notes, and snippets.

View andersonba's full-sized avatar

Anderson Dourado andersonba

View GitHub Profile
@andersonba
andersonba / executor.ts
Last active July 26, 2022 07:35
An Nx executor to run a target in parallel across all project dependencies, also forwarding the args to the commands.
import { ExecutorContext, readCachedProjectGraph } from '@nrwl/devkit'
import runCommandsExecutor from 'nx/src/executors/run-commands/run-commands.impl'
import { RunDepsExecutorSchema } from './schema'
function getForwardedArgs(): string[] {
try {
const nxCommandArg = JSON.parse(process.argv[2] || '{}') as {
overrides?: {
__overrides_unparsed__?: string[]
@andersonba
andersonba / a.html
Last active December 19, 2019 17:27
Proof of concept: Frame boundaries https://codesandbox.io/s/frame-boundaries-mp3ys
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>iframe A</title>
<script>
window.myDate = new Date();
window.myString = new String('A');
</script>
@andersonba
andersonba / FiraCodeNerdFont.css
Last active December 15, 2019 16:44
My Blink Appearance - Font & Theme
@font-face {
font-family: "Fira Code Nerd Font";
font-style: normal;
font-weight: 200;
src: url('https://github.com/ryanoasis/nerd-fonts/raw/master/patched-fonts/FiraCode/Light/complete/Fura%20Code%20Light%20Nerd%20Font%20Complete.ttf') format('truetype');
}
@font-face {
font-family: "Fira Code Nerd Font";
font-style: normal;
font-weight: 400;
@andersonba
andersonba / yvebot-react-native-example.js
Created July 1, 2019 23:48
YveBot + Gifted Chat + React Native
import YveBot from 'yve-bot/core'
import { GiftedChat } from 'react-native-gifted-chat'
class ChatBot extends Component {
constructor(rules) {
this.bot = new YveBot(rules)
this.bot
.on('typing', this.handleTyping)
.on('typed', this.handleTyped)
.on('talk', this.handleTalk)
@andersonba
andersonba / git-fetch-merge.sh
Created April 27, 2017 17:53
Git fetch, merge and push in one command
#!/usr/bin/env bash
MASTER="master"
if [[ "$1" != "" ]]; then
BRANCH="$1"
else
BRANCH=$(git rev-parse --abbrev-ref HEAD)
fi
@andersonba
andersonba / keybase.md
Created August 23, 2016 07:06
keybase.md

Keybase proof

I hereby claim:

  • I am andersonba on github.
  • I am andersonba (https://keybase.io/andersonba) on keybase.
  • I have a public key ASCNQXYwj7blWwQubgfZfjhoyhpVs-rYY5qcF-KWSP3SGgo

To claim this, I am signing this object:

@andersonba
andersonba / README.md
Last active July 13, 2016 19:46
Code snippets for Keynote presentations

Use code highlighting in Keynote

Instead of taking printscreen or pasting a plain text in your Keynote presentations, follow these steps and make it beautiful.

  1. brew install highlight
  2. highlight -O rtf filename.js |pbcopy
  3. Paste in your presentation

If you use fish shell, you could use the code_to_keynote function in this gist, see how:

  1. vim ~/.config/fish/functions/code_to_keynote.fish and paste my function