A fetch wrapper that provides a function that allows obtaining the request status wherever it is used, through the React context API.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy PR to GitHub Pages | |
on: | |
pull_request: | |
types: [opened, synchronize, ready_for_review] | |
jobs: | |
build-theme: | |
permissions: | |
actions: write | |
contents: read |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { RewritingStream } from 'parse5-html-rewriting-stream'; | |
import fs from 'fs'; | |
import path from 'path'; | |
import { table } from 'table'; | |
function getPatternTable(themeSlug, patterns) { | |
const tableConfig = { | |
columnDefault: { | |
width: 40, | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* GitHub OAuth code. | |
* | |
* @package CreateBlockTheme | |
*/ | |
add_action( 'init', 'github_oauth_init' ); | |
function github_oauth_init() { | |
if ( isset( $_GET['github_oauth'] ) && $_GET['github_oauth'] == 'authorize' ) { | |
$client_id = 'GITHUB_CLIENT_ID'; // Replace with your GitHub Client ID |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bash script that runs nvm and npm to update the gutenberg plugin | |
# and then runs the build script to build the plugin | |
# Usage: ./updateGutenberg.sh [--pull] [--no-build] | |
# --no-pull: pull from git before running npm | |
# --no-build: don't run the build script after running npm | |
PULL="false" | |
BUILD="true" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PROMPT="%(?.%F{green}➜.%F{red}➜)%f %n%B%F{#fff}@%m%f%b %F{green}%B%2~ %#%b%f " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
db: | |
image: postgres | |
ports: | |
- '5432:5432' | |
environment: | |
POSTGRES_USER: project_name | |
POSTGRES_PASSWORD: project_name | |
POSTGRES_DB: project_name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Bee Movie Script | |
According to all known laws | |
of aviation, | |
there is no way a bee | |
should be able to fly. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const readableExists = (array, key, value) => array.reduce((acc, obj) => { | |
if (obj[key] && obj[key] === value) { | |
return true; | |
} | |
return acc; | |
}, false); | |
const cleverExists = (array, key, value) => array.reduce((acc, obj) => { | |
return obj[key] && obj[key] === value || acc; | |
}, false); |
I hereby claim:
- I am vcanales on github.
- I am vcanales (https://keybase.io/vcanales) on keybase.
- I have a public key ASBq2EhLiuptV1C7u7NJQHqzMi4xXpfJn1LPJ9nPqLYLZgo
To claim this, I am signing this object:
NewerOlder