Skip to content

Instantly share code, notes, and snippets.

View Arnesfield's full-sized avatar
🙃
¯\_(ツ)_/¯

Jefferson Rylee Arnesfield

🙃
¯\_(ツ)_/¯
  • ISBX Phils., Inc.
  • Philippines
View GitHub Profile
@Arnesfield
Arnesfield / lazynvm.sh
Last active November 27, 2024 08:24 — forked from fl0w/lazynvm.sh
# lazyload nvm
# all props goes to http://broken-by.me/lazy-load-nvm/
# grabbed from reddit @ https://www.reddit.com/r/node/comments/4tg5jg/lazy_load_nvm_for_faster_shell_start/
# NOTE: globally installed npm packages are not in PATH
# unless one of the commands (npm, node, npm, npx) is run first
export NVM_DIR="$HOME/.nvm"
lazynvm() {
unset -f nvm node npm npx lazynvm
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
@Arnesfield
Arnesfield / README.md
Last active April 19, 2024 09:57
ternimal

ternimal

This gist contains the preview for ternimal.

@Arnesfield
Arnesfield / README.md
Last active May 31, 2025 03:49
rollup-plugin-output-size-preview
@Arnesfield
Arnesfield / gnome3_keybind_backup.sh
Created October 18, 2023 05:58 — forked from peterrus/gnome3_keybind_backup.sh
Backs up and restores gnome3 keybindings
#!/usr/bin/env bash
# Backs up and restores gnome3 keybindings
# Tested with Gnome 3.36.8
# by peterrus
set -e
mkdir -p gnome3-keybind-backup
@Arnesfield
Arnesfield / bitbucket-open-all-prs.js
Created February 28, 2023 02:18
Bitbucket: Open All PRs
// open all bitbucket prs in a new tab
// https://bitbucket.org/dashboard/pullrequests
function bitbucketOpenAllPRs() {
const list = document.querySelector('.pullrequest-list');
const links = list ? Array.from(list.querySelectorAll('a.execute')) : [];
for (const link of links) {
link.dispatchEvent(
new MouseEvent('click', { ctrlKey: true, shiftKey: true })
);
@Arnesfield
Arnesfield / README.md
Last active January 13, 2023 06:17
Celeste Fast Chapter Restart for Linux
@Arnesfield
Arnesfield / rollup-typescript.md
Created May 31, 2022 08:08 — forked from aleclarson/rollup-typescript.md
The best Rollup config for TypeScript libraries

Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking
🧐 Source maps

Install

ts-node -r tsconfig-paths/register src/main.ts
node -r ts-node/register --max-old-space-size=4096 index.ts
@Arnesfield
Arnesfield / web-api-proxy.js
Last active March 8, 2021 05:15
Simple Node.js proxy sample for Web and API servers for development.
const http = require("http");
const httpProxy = require("http-proxy");
// set your port and target URLs
const port = 8000;
const web = httpProxy.createProxyServer({ target: "http://localhost:8080" });
const api = httpProxy.createProxyServer({ target: "http://localhost:8081" });
// use API proxy for requests asking for `/api` resource
const server = http.createServer((req, res) => {
@Arnesfield
Arnesfield / delete-all-s3-objects.ts
Created August 5, 2020 00:48
Deletes all S3 Objects on the specified bucket.
import { S3 } from 'aws-sdk';
// or public async
async function deleteAllS3Objects() {
// setup
const s3client: S3 = this.s3client; // new S3(options)
const bucketName: string = this.bucketName; // set bucket name
// I activate my trap!
// This deletes all S3 Objects on the specified bucket!