Skip to content

Instantly share code, notes, and snippets.

View teriu's full-sized avatar

Te Riu Warren teriu

View GitHub Profile
@magnetikonline
magnetikonline / README.md
Last active July 23, 2024 00:23
Cleanup legacy GitHub Actions workflow runs.

Cleanup legacy GitHub Actions workflow runs

Python utility to bulk delete GitHub Actions runs for a given workflow, either current or legacy/since removed. The GitHub web UI currently allows removal of individual workflow runs - but this becomes tedious quickly when performed in bulk.

Usage

Create a new Personal access token allowing the workflow scope:

image

@turadg
turadg / generateFlowModuleNameMappers.js
Last active June 20, 2018 06:28
Helper to create .flowconfig module name mapper
#!/usr/bin/env node
/**
* Flowtype understands Node (or Haste) imports but not Webpack.
*
* Many codebases have webpack set up like:
* src/foo.js
* src/components/Bar.jsx
*
* And then import them like `require('foo')` or `require/components/Bar.jsx`
*
@Rich-Harris
Rich-Harris / service-workers.md
Last active July 10, 2024 17:04
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@joshbedo
joshbedo / renderSceneFix
Created January 8, 2016 00:04
fix renderScene
renderScene(route, navigator) {
if (route && route.component) {
let Component = route.component;
return (
<Component navigator={navigator} route={route} />
)
}
switch (this.state.currentRoute) {
case 'LOGIN_STATE_LOGOUT':
@witt3rd
witt3rd / brew-sync.sh
Last active February 25, 2024 12:04 — forked from jpawlowski/brew-sync.sh
Sync Homebrew installations between Macs via Dropbox
#!/bin/bash
# Sync Homebrew installations between Macs via Dropbox
#
BREW="/usr/local/bin/brew"
# first get local settings
echo "Reading local settings ..."
rm -f /tmp/brew-sync.*
@nolanlawson
nolanlawson / wishlist.md
Last active May 3, 2021 11:51
Safari IndexedDB/WebSQL bug wishlist

Safari IndexedDB/WebSQL bug wishlist

Big overview of what's missing in Safari 7.1+ and iOS 8+ in terms of browser storage.

Updated May 25th 2016

Safari (general)

@staltz
staltz / introrx.md
Last active July 22, 2024 09:31
The introduction to Reactive Programming you've been missing
@ziadoz
ziadoz / compslug.class.php
Last active December 17, 2015 19:59
Perch Composite Slug Field Type
<?php
/**
* Composite Slug Field Type.
*
* File: PERCH_PATH/addons/fieldtypes/compslug/compslug.class.php
* Usage: <perch:content id="slug" type="compslug" for="lastname firstname" suppress="true" />
* @author Jamie York
**/
class PerchFieldType_compslug extends PerchFieldType
{
@ziadoz
ziadoz / checklist.class.php
Last active December 11, 2015 03:58
Perch Checkbox List Field Type
<?php
/**
* Checklist Field Type.
*
* File: PERCH_PATH/addons/fieldtypes/checklist/checklist.class.php
* Usage: <perch:content id="features" type="checklist" label="Features" options="Feature 1, Feature 2, Feature 3" />
* @author Jamie York
**/
class PerchFieldType_checklist extends PerchAPI_FieldType
{
@bryanjswift
bryanjswift / vimeo.class.php
Created September 23, 2012 06:52
Perch2 field type for vimeo embeds. Heavily based on youtube.class.php by Drew McLellan.
<?php
/**
* A field type for Vimeo videos
*
* @package default
* @author Bryan Swift
*/
class PerchFieldType_vimeo extends PerchAPI_FieldType
{