Skip to content

Instantly share code, notes, and snippets.


Aparajita Fishman aparajita

View GitHub Profile
#!/usr/bin/env python
import codecs
import os
from os.path import join
import re
import sys
if len(sys.argv) < 3:
aparajita / A4D_Init.txt
Last active Aug 29, 2015
A4D_Init method
View A4D_Init.txt
`METHOD: A4D_Init{(inStartWebServer)}
`Part of Active4D, the ultimate 4D web environment
`Copyright © Aparajita Fishman, All Rights Reserved
If (Count parameters=0)
aparajita / npmls.js
Last active Jan 4, 2020
npmls: A (much) better npm listing tool
View npmls.js
#!/usr/bin/env node
"use strict";
const child_process = require("child_process");
const fs = require("fs");
const help = `Usage: npmls.js [-gh|--help] [filter...]
** Requires Node >= 4 **
aparajita / yarnls.js
Last active Mar 2, 2018
yarnls.js: The missing yarn command. Lists only the top level packages in the current directory.
View yarnls.js
#!/usr/bin/env node
'use strict';
const child_process = require('child_process');
const format = require('util').format;
const fs = require('fs');
const path = require('path');
function parseOptions() {
aparajita / hosts
Created Feb 23, 2019
hosts file entries to block Facebook
View hosts
# Block facebook!
View AppDelegate.js
export default class AppDelegate extends UIResponder { // eslint-disable-line
applicationPerformFetchWithCompletionHandler(application, completionHandler) {
console.log('App is running in background')
// Check for new data
const newData = true
// If new data exists, initiate a local notification
if (newData) {
// Let the OS know that there were new data and complete the task
aparajita /
Last active Jun 1, 2021
Script to notarize a 4D plugin
#!/usr/bin/env bash
# $1 - Source plugin path, must be on a local filesystem
# This script relies on jq, a JSON parser. You can download
# it at, or install via package
# managers such as brew or apt.
aparajita /
Last active Apr 17, 2021
Shell script to install the latest Node version using fnm, pnpm and jq
localVersion=$(fnm ls | tail -n 1 | perl -n -e '/^.*(v\d+\.\d+\.\d+)/ && print $1')
remoteVersion=$(fnm ls-remote | grep -E '.+v\d+\.\d+\.\d+' | tail -n 1 | perl -n -e '/^.*(v\d+\.\d+\.\d+)/ && print $1')
if [[ "$remoteVersion" != "$localVersion" ]]; then
echo Version "$remoteVersion" available
fnm use "$localVersion"
# shellcheck disable=SC2034
View npm-debug.log
0 verbose cli [
0 verbose cli '/Users/aparajita/.fnm/node-versions/v15.0.1/installation/bin/node',
0 verbose cli '/Users/aparajita/.fnm/node-versions/v15.0.1/installation/bin/npm',
0 verbose cli 'publish',
0 verbose cli '--ignore-scripts',
0 verbose cli '--publish-branch',
0 verbose cli 'main',
0 verbose cli '--dry-run'
0 verbose cli ]
1 info using npm@7.0.3