Skip to content

Instantly share code, notes, and snippets.

View jchiatt's full-sized avatar

J.C. Hiatt jchiatt

View GitHub Profile
@jchiatt
jchiatt / cpt-ui-movies-import.json
Last active February 6, 2017 05:31
Movies Custom Post Type - CPT UI Import
{"movies":{"name":"movies","label":"Movies","singular_label":"Movie","description":"","public":"true","publicly_queryable":"true","show_ui":"true","show_in_nav_menus":"true","show_in_rest":"true","rest_base":"movies","has_archive":"false","has_archive_string":"","exclude_from_search":"false","capability_type":"post","hierarchical":"false","rewrite":"true","rewrite_slug":"","rewrite_withfront":"true","query_var":"true","query_var_slug":"","menu_position":"","show_in_menu":"true","show_in_menu_string":"","menu_icon":"","supports":["title","editor","thumbnail"],"taxonomies":[],"labels":{"menu_name":"","all_items":"","add_new":"","add_new_item":"","edit_item":"","new_item":"","view_item":"","search_items":"","not_found":"","not_found_in_trash":"","parent_item_colon":"","featured_image":"","set_featured_image":"","remove_featured_image":"","use_featured_image":"","archives":"","insert_into_item":"","uploaded_to_this_item":"","filter_items_list":"","items_list_navigation":"","items_list":""},"custom_supports":""}}
@jchiatt
jchiatt / headless-wp-acf-import
Last active February 7, 2017 23:05
Advanced Custom Fields Import Data for Headless-WP demo
[
{
"key": "group_582cf1d1ea6ee",
"title": "Movie Data",
"fields": [
{
"key": "field_582cf1d9956d7",
"label": "Release Year",
"name": "release_year",
"type": "number",
@jchiatt
jchiatt / movie-data.xml
Last active February 8, 2017 04:55
Headless WP - Movies Data
<?xml version="1.0" encoding="UTF-8" ?>
<!-- This is a WordPress eXtended RSS file generated by WordPress as an export of your site. -->
<!-- It contains information about your site's posts, pages, comments, categories, and other content. -->
<!-- You may use this file to transfer that content from one site to another. -->
<!-- This file is not intended to serve as a complete backup of your site. -->
<!-- To import this information into a WordPress site follow these steps: -->
<!-- 1. Log in to that site as an administrator. -->
<!-- 2. Go to Tools: Import in the WordPress admin panel. -->
<!-- 3. Install the "WordPress" importer from the list. -->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>App Title</title>
</head>
# See https://help.github.com/ignore-files/ for more about ignoring files.
# dependencies
/node_modules
# misc
.DS_Store
@jchiatt
jchiatt / beginning.js
Created October 22, 2018 22:27
How to Filter a JavaScript Array - Beginning
const exercises = [
{ name: "Bench Press", muscle: "Chest" },
{ name: "Back Squat", muscle: "Legs" },
{ name: "Deadlift", muscle: "Back" },
{ name: "Bent Over Row", muscle: "Back" },
{ name: "Overhead Press", muscle: "Shoulders" }
];
@jchiatt
jchiatt / ending.js
Created October 22, 2018 22:28
How to Filter a JavaScript Array - Ending
const exercises = [
{ name: "Bench Press", muscle: "Chest" },
{ name: "Back Squat", muscle: "Legs" },
{ name: "Deadlift", muscle: "Back" },
{ name: "Bent Over Row", muscle: "Back" },
{ name: "Overhead Press", muscle: "Shoulders" }
];
const backDay = exercises.filter(exercise => exercise.muscle === "Back");
@jchiatt
jchiatt / beginning.js
Created October 26, 2018 23:41
Beginning of Destructuring Nested Objects in JavaScript Video
const benchPress = {
muscles: {
primary: "Chest",
secondary: "Triceps"
},
variations: {
standard: {
muscles: {
primary: "Chest",
secondary: "Triceps"
@jchiatt
jchiatt / ending.js
Created October 26, 2018 23:48
Final code for Destructuring Nested Objects in JavaScript Video
const benchPress = {
muscles: {
primary: "Chest",
secondary: "Triceps"
},
oneRepMax: {
variations: {
standard: {
lbs: 315,
kgs: 142.882
@jchiatt
jchiatt / 1.md
Created January 3, 2019 23:15 — forked from swyxio/1.md
Learn In Public - 7 opinions for your tech career

1. Learn in public

If there's a golden rule, it's this one, so I put it first. All the other rules are more or less elaborations of this rule #1.

You already know that you will never be done learning. But most people "learn in private", and lurk. They consume content without creating any themselves. Again, that's fine, but we're here to talk about being in the top quintile. What you do here is to have a habit of creating learning exhaust. Write blogs and tutorials and cheatsheets. Speak at meetups and conferences. Ask and answer things on Stackoverflow or Reddit. (Avoid the walled gardens like Slack and Discourse, they're not public). Make Youtube videos or Twitch streams. Start a newsletter. Draw cartoons (people loooove cartoons!). Whatever your thing is, make the thing you wish you had found when you were learning. Don't judge your results by "claps" or retweets or stars or upvotes - just talk to yourself from 3 months ago. I keep an almost-daily dev blog written for no one else but me.

Guess what? It