Skip to content

Instantly share code, notes, and snippets.

View ruyadorno's full-sized avatar

Ruy Adorno ruyadorno

View GitHub Profile

npm audit licenses

Questions:

  • workspaces
    • maybe just handled via config?
    • maybe tweak licensee to better handle it?
  • configuration?
    • package.json property
  • audit.json file?
@ruyadorno
ruyadorno / running-cmds-in-workspaces.md
Last active February 18, 2021 23:29
Running commands in Workspaces
  • RFC TODAY: npm fund --workspace=a
  • RFC TODO CHANGE: npm ws fund --workspace=a --workspace=b --workspace=group-name

Adding a top-level workspaces|ws command should abstract enough the implementation to make it flexible enough to accomodate future tweaks in the workspace installing algorithm.

Where to start?

  • Add new workspaces|ws command/alias
  • Add new folder ./lib/workspaces/*.js
  • Add default behavior that sets prefix to top-level commands under ./lib/workspaces/default.js
  • Add ws run-script
@ruyadorno
ruyadorno / NPM_DIFF_NOTES.md
Last active January 27, 2021 17:33
What arguments mean in npm diff

npm diff args

Special conversions:

  • IF NO arg:
    • READ package.json name
      • IF FOUND:
        • RETURN package-json-name@tag - file:.
      • ELSE:
        • THROW usage
  • IF arg is package-name only:
@ruyadorno
ruyadorno / v14.x-diff.md
Last active November 24, 2020 21:47
branch-diff v14.x-staging upstream/v15.x --exclude-label semver-major,semver-minor,dont-land-on-v14.x,backport-requested-v14.x,backported-to-v14.x,backport-blocked-v14.x,backport-open-v14.x,baking-for-lts --filter-release
[{"ts":1.6284000000005108,"k":"S"},{"ts":2.0466000000005806,"k":"h"},{"ts":2.1275000000005093,"k":"e"},{"ts":2.2127000000000407,"k":" "},{"ts":2.396600000000035,"k":"c"},{"ts":2.482600000000275,"k":"a"},{"ts":2.5471999999999753,"k":"m"},{"ts":2.701799999999821,"k":"e"},{"ts":2.7775000000001455,"k":" "},{"ts":2.896099999999933,"k":"a"},{"ts":3.0354999999999563,"k":"c"},{"ts":3.2236000000002605,"k":"r"},{"ts":3.4023999999999432,"k":"o"},{"ts":3.578400000000329,"k":"s"},{"ts":3.7169000000003507,"k":"s"},{"ts":3.876100000000406,"k":" "},{"ts":4.024600000000646,"k":"t"},{"ts":4.090900000000147,"k":"o"},{"ts":4.151300000000447,"k":" "},{"ts":4.2984000000005835,"k":"h"},{"ts":4.370700000000397,"k":"i"},{"ts":4.49369999999999,"k":"m"},{"ts":4.704400000000533,"k":","},{"ts":4.766500000000633,"k":" "},{"ts":4.899300000000039,"k":"a"},{"ts":4.966400000000249,"k":"d"},{"ts":5.014299999999821,"k":"n"},{"ts":5.9265000000004875,"k":"n"},{"ts":5.975300000000061,"k":"d"},{"ts":6.023299999999836,"k":" "},{"ts":6.19830000000001
@ruyadorno
ruyadorno / Secure Linux Server.md
Last active July 23, 2023 00:16
Tips on how to secure a linux server

SSH:

  • Disable root login
  • Disable password authentication
  • Use sudo-based privilege separation
  • Use public key authentication (ECDSA, Ed25519, etc...)
  • (Optional) Store key on smartcard
  • (Optional) Use a two-factor system such as Duo
  • (Optional) Change port of SSH to non-default (this is security by obscurity, but it deters most automated attacks, although this shouldn't matter if you're using key-based auth).

Firewall:

@ruyadorno
ruyadorno / install-arch-linux-on-a-raspberrypi.md
Last active May 17, 2021 12:11
Install Arch Linux on a RaspberryPi
@ruyadorno
ruyadorno / setup.md
Last active July 17, 2017 18:48 — forked from bmhatfield/.profile
Automatic Git commit signing with GPG on OSX

How to set up Git GPG signed commits

1. Generate GPG key

https://help.github.com/articles/generating-a-new-gpg-key/

  • PS: During latest setup homebrew ended up installing gpg as gpg2, that requires some very minor tweaks and of course making sure the commands use gpg2 instead of gpg
  • PS2: Make sure to save key to 1 Password or equivalent

2. Add key to Github account

// everyone's better of using a proper solution: https://github.com/Automattic/util-inspect
export function traceme(obj, depth) {
if (depth===0) return;
for (var key in obj) {
if (obj[key] && obj[key].constructor.prototype === Array.prototype) obj[key] = obj[key].toString();
var value = typeof obj[key] === 'object' && obj[key] !== null ? traceme(obj[key], depth-1) : obj[key];
console.log(key + ': ' + value);
}
}
@ruyadorno
ruyadorno / osx_setup.md
Last active March 12, 2024 03:23 — forked from millermedeiros/osx_setup.md
Guide for setting up a new osx

Setup Mac OS X

This is just a personal script to help me remember all the steps required to setup a new osx machine in their correct order. I do not advise you to follow this guide if you don't know what you're doing.

Setup

0. Setup iCloud