Skip to content

Instantly share code, notes, and snippets.

View samueljseay's full-sized avatar
😘

Sam Seay samueljseay

😘
View GitHub Profile
@samueljseay
samueljseay / gist:7779276
Last active December 15, 2023 20:22 — forked from jimbojsb/gist:1630790
Color highlight and copy code for presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@samueljseay
samueljseay / es6-import-cheat-sheet.md
Created June 2, 2017 02:35
ES6 exports / imports cheat sheet
// default exports
export default 42;
export default {};
export default [];
export default (1 + 2);
export default foo;
export default function () {}
export default class {}
export default function foo () {}
@samueljseay
samueljseay / delete_runs.js
Last active August 10, 2023 08:26
Delete runs for a workflow using GH cli / node.js
const fs = require('fs');
const path = require('path');
const { execSync } = require('child_process');
function deleteRuns(workflowName, repoNameWithOwner) {
try {
// Get the list of run IDs
execSync(`gh run list --json databaseId -w ${workflowName} -L 9999 -q '.[].databaseId' > temp.txt`);
// Read and process each run ID
@samueljseay
samueljseay / package.json
Last active October 5, 2021 21:12
Snowpack custom headers plugin
{
"name": "snowpack-custom-headers",
"version": "0.0.1",
"description": "",
"main": "snowpack-custom-headers.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Samuel Seay",
"license": "MIT",
@samueljseay
samueljseay / task-extensibility.md
Created February 25, 2021 06:45
Task Extensibility

Use Setup Tasks to provide a first-class on-boarding experience for merchants

As a plugin author you'll often have one or more set up tasks you want to guide your user through to get the most out of your plugin. The challenge is making sure users see your tasks, and also making sure they complete them all.

The WooCommerce home screen is a consolidated landing space for users to get their store set up and effectively manage day-to-day operations for their business. Adding setup tasks to the task list alongside the usual setup steps will draw users to complete your tasks and also help them keep track of how far through the setup process they are.

We've built the user experience for you, so all that's left is just to plug your tasks in!

Getting started

@samueljseay
samueljseay / store-management.md
Created February 25, 2021 06:42
# Adding your own store management links

Adding your own store management links

In the new and improved WooCommerce home screen there are 2 points of extensibility for plugin developers that have recently had some attention. The first is the setup task list, allowing you to remind the user of tasks they need to complete and keeping track of their progress for them.

The second is the store management links section. Once the user has completed the setup tasks this will display for them. This section consolidates a list of useful quick navigation links that the user can use to find features of WooCommerce.

Discoverability can be hard for users so this can be a great place to bring attention to the features of your plugin and allow users to easily find their way to the key functionality your plugin provides.

Adding your own store management links is a simple process.

@samueljseay
samueljseay / test.java
Created January 17, 2019 01:59
LithoActivityTestRule error
import androidx.test.ext.junit.runners.AndroidJUnit4;
import com.facebook.litho.testing.espresso.LithoActivityTestRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class CardFeedActivityTest {
@Rule
@samueljseay
samueljseay / nz-mtg-coc.md
Last active October 25, 2018 00:21 — forked from didichanoch/sample-discord-coc.md
New Zealand MTG Code of Conduct

New Zealand MTG Code of Conduct

Welcome!

The New Zealand MTG Discord channel is a place for Magic players throughout NZ to gather, talk, trade and arrange games together. We hope you have fun!

The current admins are:

  • Sam Seay
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
wget http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
@samueljseay
samueljseay / .eslintignore
Created December 12, 2016 02:31
lint console logs with eslint before committing code
# put paths to files you don't want to lint here
path/to/files/to/ignore