Skip to content

Instantly share code, notes, and snippets.

View PieterT2000's full-sized avatar

Pieter PieterT2000

View GitHub Profile
@DavidWells
DavidWells / javascript-proxy-as-rest-client.js
Last active May 12, 2024 14:24
Using a javascript proxy as low code REST client
/* Using a JavaScript proxy for a super low code REST client */
// via https://dev.to/dipsaus9/javascript-lets-create-aproxy-19hg
// also see https://towardsdatascience.com/why-to-use-javascript-proxy-5cdc69d943e3
// also see https://github.com/fastify/manifetch
// also see https://github.com/flash-oss/allserver
// and https://gist.github.com/v1vendi/75d5e5dad7a2d1ef3fcb48234e4528cb
const createApi = (url) => {
return new Proxy({}, {
get(target, key) {
@rouxcaesar
rouxcaesar / bradfield-thoughts.md
Last active June 25, 2024 17:11
Thoughts on Bradfield

My Thoughts on Bradfield

I've been asked by several people over time about my experience with the classes offered by Bradfield, and thought that I should save some future keystrokes by writing up a short gist for future reference. Hopefully this gist will be useful for others who are considering Bradfield and wondering it is worth it. My intended audience is primarily Launch School students who have completed the Core program and likely also Capstone, but the majority of this gist will be applicable to anyone who is a working/experienced software engineer.

Since late 2019, I've taken 4 short courses from the Bradfield School of Computer Science and in 2021 I enrolled in their Computer Science Intensive (CSI) program1. Overall, I've found the courses and CSI to be an excellent opportunity to grown my technical skills and broaden my knowledge of CS topics.

The courses I completed were:

  • Computer Architecture: The Hardware/Software Interface
// @ts-ignore
import GatsbyParser from "gatsby/dist/query/file-parser";
import path from "path";
import glob from "glob";
/**
* Collect all graphql fragments from a directory
* @see https://github.com/gatsbyjs/gatsby/issues/12155#issuecomment-618424527
*/
export const collectGraphQLFragments = async (
@schlessera
schlessera / script.md
Last active April 13, 2023 10:54
Siteground webinar - Learn How WP-CLI Can Make Your Life Easier

Siteground webinar - Learn How WP-CLI Can Make Your Life Easier

Webinar description

WP-CLI, the command-line interface for WordPress, is one of the most popular tools among WordPress developers. However, it can be extremely helpful for anyone managing a WordPress site. In this webinar, the main person behind WP-CLI project: Alain Schlesser will show us the ins and outs of the tool. He will give us great examples on how it can be used to improve your workflow, for beginners to experienced developers and for projects big and small. We will give you invaluable examples on how to perform different tasks with WP-CLI automatically, saving you time and preventing you from making manual errors, like:

  • Keep forgetting to backup? Automate the process with WP-CLI.
  • Site not working? Get tips for easy troubleshoot with WP-CLI.
  • Too many spam comments? Learn how to clean them in no time.
  • Can’t log into your site? Reset your password with WP-CLI.
@uxter
uxter / nodemon-watch-java-example.md
Last active September 24, 2022 11:49
nodemon watch and run java application
nodemon -e java —watch ./src —exec 'javac -sourcepath ./src -d ./bin \
src/path/to/code/ServerExample.java; \
java -classpath ./bin path.to.code.ServerExample'
@datchley
datchley / react-redux-style-guide.md
Last active February 13, 2024 14:30
React + Redux Style Guide
@leepeterson
leepeterson / acf-disable-frontend.php
Last active September 17, 2020 07:27 — forked from billerickson/be-disable-acf-frontend.php
Disable ACF functions on the front-end of WordPress in order to provide a performance boost.
<?php
/**
* Plugin Name: Disable ACF on Frontend
* Description: Disable ACF functions on the front-end of WordPress in order to provide a performance boost.
* Version: 2.0
* Author: Lee Peterson
* Author URI: http://www.leepeterson.me
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/
@paulirish
paulirish / what-forces-layout.md
Last active July 4, 2024 22:13
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@staltz
staltz / introrx.md
Last active July 4, 2024 10:11
The introduction to Reactive Programming you've been missing