Skip to content

Instantly share code, notes, and snippets.

View endymion1818's full-sized avatar
🦈
47

Ben Read endymion1818

🦈
47
View GitHub Profile
@endymion1818
endymion1818 / config.sh
Created February 8, 2022 16:21
some handy aliases
alias grum="git checkout master && git pull --all"
alias gc="git commit"
alias ga="git add"
alias gp="git push"
alias k="kubectl"
@endymion1818
endymion1818 / test.js
Last active September 23, 2021 10:55
stackoverflow-66579559
// I had issues with this
it('should work', async () => {
await waitFor(() => {
// assertion
})
});
// this worked for me
@endymion1818
endymion1818 / next.config.js
Created August 6, 2021 13:13
NextJS withPlugins redirects
const withPlugins = require('next-compose-plugins');
const withSourceMaps = require('@zeit/next-source-maps');
const nextConfig = {
basePath: '/messages',
};
const _withSourceMaps = [
withSourceMaps,
{
@endymion1818
endymion1818 / bash-commands.sh
Last active April 10, 2021 21:10
frequently used bash commands
curl -I <domain> # what headers are enabled on this site
sudo lsof -i :<port> # what process (pid) is running at a specified port, followed often by kill -9 <pid>
sudo killall -HUP mDNSResponder # reset local DNS cache
@endymion1818
endymion1818 / pre-commit
Created October 4, 2019 09:28
protected branches (git hook)
#!/bin/bash
protected_branches=( production master )
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,')
for i in "${protected_branches[@]}"
do
protected_branch=$i
@endymion1818
endymion1818 / settings.json
Last active September 26, 2019 19:59
VSCode settings
{
"terminal.integrated.shell.osx": "/bin/zsh",
"editor.wordWrap": "on",
"references.preferredLocation": "view",
"workbench.panel.defaultLocation": "right",
"peacock.favoriteColors": [
{
"name": "Zopa Teal",
"value": "#00B9A7"
},
import React, {FC} from 'react'
import Column from '../Atoms/Column'
import Row from '../Atoms/Row'
export interface IContentProps {
/**
* an array of objects with JSX elements
* @default <>&nbsp;</>
*/
innerContent: JSX.Element
@endymion1818
endymion1818 / netmag-context-data
Created January 26, 2019 09:27
Context tutorial data
[
{
"_id": "5c4c278665e65c411445a158",
"index": 0,
"guid": "3d80eb64-3477-408a-997f-eb8fe2e0fb2a",
"isActive": true,
"about": "Et veniam sunt cillum occaecat dolor in ex sunt nulla anim deserunt cupidatat laborum. Consequat commodo laboris officia labore eiusmod enim pariatur deserunt. Qui minim ipsum incididunt pariatur elit ullamco dolore officia sunt sit cillum.",
"highValue": [
"5,763.60",
"2,185.52",
Doc - Complete Fully - - Loaded
Load time First Byte Start Render Speed Index First Interactive Time Requests Bytes In Time Requests Bytes In Cost
<?php
namespace Origin\Theme\Metaboxes;
class PageMetaBox extends \Origin\Framework\Objects\Metabox
{
/**
* A unique id/key for this Meta box.
*
* @var string