Skip to content

Instantly share code, notes, and snippets.

View keybase.md

Keybase proof

I hereby claim:

  • I am tibdex on github.
  • I am tibdex (https://keybase.io/tibdex) on keybase.
  • I have a public key whose fingerprint is F6AF B671 E754 8984 ABF0 9433 4D70 CA27 CD3E 4D39

To claim this, I am signing this object:

@tibdex
tibdex / list-accessible-repositories.js
Created Jun 27, 2019
List all repositories that a GitHub App can access.
View list-accessible-repositories.js
const { App } = require("@octokit/app"); // ^3.0.0
const Octokit = require("@octokit/rest"); // ^16.25.0
const APP_ID = 1337;
const PRIVATE_KEY = `-----BEGIN RSA PRIVATE KEY-----
...
your private key content
...
-----END RSA PRIVATE KEY-----`;
@tibdex
tibdex / absolute-to-relative.js
Created Dec 9, 2016
jscodeshift codemod to change imports of internal modules using absolute path to relative path
View absolute-to-relative.js
/**
* This codemod expects 2 CLI arguments:
* - packageDir: the path of the directory containing the package.json. It's used to detect whether a path points
* to a dependency or an internal module.
* - rootDirs: root directory paths separated by a comma if you have more than one root.
* Let's say that you have two files:
* - src/component.js
* - src/index.js containing the import "import Component from 'component.js';"
* To have the transformation successfully working you need to call jscodeshift with the "--rootDirs ./src" argument.
*/