Skip to content

Instantly share code, notes, and snippets.

View azanli's full-sized avatar
🐼
Doing all the things that pandas do...

Andy Li azanli

🐼
Doing all the things that pandas do...
  • Rally Health
  • San Francisco
View GitHub Profile
@azanli
azanli / getFlatList.bash
Last active November 9, 2017 05:05 — forked from cooperka/getFlatList.bash
How to download FlatList and its related dependencies directly into your node_modules.
mkdir -p node_modules/react-native/Libraries/Lists/ && \
for file in 'FlatList' 'MetroListView' 'SectionList' 'VirtualizedList' 'VirtualizedSectionList' 'ViewabilityHelper' 'VirtualizeUtils' 'FillRateHelper'; \
do curl https://raw.githubusercontent.com/facebook/react-native/master/Libraries/Lists/${file}.js > node_modules/react-native/Libraries/Lists/${file}.js; \
done
@azanli
azanli / Email_Scraper.js
Last active February 6, 2024 20:45
An email scraper for websites - extracts names and emails from a page & inserts them into your Google Spreadsheet for Mail Merge
class Email_Scraper {
constructor(log = false, names = true, scriptURL = '', spreadsheetURL = '') {
this.currIndex = 0;
this.log = log;
this.names = names;
this.pendingRecursive = 1;
this.scriptURL = scriptURL;
this.spreadsheetURL = spreadsheetURL;
this.sourceIndex = 0;
this.sources = {};
import React from 'react';
import { Linking, Text } from 'react-native';
export default function renderHyperlinkedText(string, baseStyles = {}, linkStyles = {}, openLink) {
if (typeof string !== 'string') return null;
const httpRegex = /http/g;
const wwwRegex = /www/g;
const comRegex = /.com/g;
const httpType = httpRegex.test(string);
const wwwType = wwwRegex.test(string);
import idx from 'idx'
/*
* This code is copyright 2012 by Gavin Kistner, !@phrogz.net
* It is covered under the license viewable at http://phrogz.net/JS/_ReuseLicense.txt
* Schwartzian transform - https://en.wikipedia.org/wiki/Schwartzian_transform
*
* This is used mainly for additional sorting among equal values due to efficiency.
* Example: sortBy(data, o => [o.active, o.age, o.name]);
* i.e. sort by active, then amongst active sort by age, then amongst
@azanli
azanli / Scramble Ordered Digits
Last active July 27, 2021 18:22
Scramble an ordered list of digits hashed by a secret passphrase
/*
* Scramble Ordered Digits
*
* This function takes in a `passphrase` and `limit` argument and returns
* a scrambled list of digits, n ... {limit}.
*
* This assumes that the original ordered digits are whole numbers starting
* from 1 ... {limit} where `limit` is the max digit.
*
* For example, `scrambleOrderedDigits('Hello World')` hashes 24 digits to the order on the right-hand side:
@azanli
azanli / github-workflow-bookmarklet.md
Last active May 20, 2026 17:32
GitHub Actions Workflow Form Preset Generator (Bookmarklet)

GitHub Actions Workflow Form Preset Generator (Bookmarklet)

Tired of repeatedly filling out the exact same input parameters every time you manually trigger a GitHub Actions workflow?

This utility is a meta-bookmarklet (a bookmarklet that generates custom bookmarklets). Fill out your workflow form once, click this generator bookmarklet, and it will instantly create a brand new, single-purpose bookmarklet containing your exact inputs. Next time, just click your custom preset bookmarklet to instantly populate the form!

It supports all standard GitHub workflow inputs, including text fields, dropdowns (select), checkboxes, and radio buttons.