Skip to content

Instantly share code, notes, and snippets.

@40thieves
40thieves / ldn8-job-hunting-call.md
Last active August 4, 2022 20:59
Notes and recommendations for CYF LDN8 job hunting

Job Hunting

General thoughts based on Alun's presentation

  • Figuring out what you actually want to do
    • How to decide? What did you enjoy doing during the course and on the project? What didn’t you enjoy? (But remember that just because it’s hard to learn doesn’t mean you wouldn’t to do it)
  • Apply to LOTS of jobs
    • It's a marathon not a sprint
    • Create a template cover letter that you can easily tweak for different jobs - just make 100% sure you have correctly changed the company name & job title before you send it!
  • Cover letters are your chance to show that you're excited about the job! Talk about why you want this job in particular or the why you like the company
@40thieves
40thieves / machine.js
Last active August 4, 2021 13:10
Generated by XState Viz: https://xstate.js.org/viz
const sleepMachine = Machine({
initial: 'awake',
states: {
awake: {
on: {
GO_TO_SLEEP: 'asleep'
}
},
asleep: {
on: {
@40thieves
40thieves / machine.js
Created August 4, 2021 09:49
Generated by XState Viz: https://xstate.js.org/viz
const fetchMachine = Machine({
id: 'http',
initial: 'idle',
context: {
data: []
},
states: {
idle: {
on: {
FETCH: 'loading'

Fixing ESLint in your pokedex app

In your lesson you may have encountered some ESLint errors, don't stress about it, this is not your fault! An issue slipped into the CYF template code and now we will fix it together 🙂

ESLint rules are designed to help you by making sure your code is consistent. It is common to for companies to turn on ESLint rules so that every developer that the company writes code in a similar way. During the lesson we did not have enough time to fix everyone's code to match the rules.

To fix the problem, there are 2 possible solutions:

  • A quick fix, which simply disables the rules. This will get you writing React code faster, but in the future you may have problems with code that is inconsistent with other trainee's
  • A more complete fix, but will change your editor config so that your code will be consistent in VSCode from now on

Fixing ESLint problems with the pokedex app on a Windows computer

Step 1: Remove the eslint disable comments

  1. In your pokedex project, find all the files with a comment like: /* eslint-disable indent, linebreak-style */
  2. Edit the comment to remove the linebreak-style bit, so that it just becomes /* eslint-disable indent */

This will cause ESLint to fail, but don't worry we'll fix it in the next step :)

Step 2: Change the End of Line Sequence in your files

@40thieves
40thieves / machine.js
Last active January 6, 2021 09:35
Generated by XState Viz: https://xstate.js.org/viz
const chatMachine = Machine({
id: "chat",
type: "parallel",
context: {
messages: []
},
states: {
http: {
initial: "idle",
states: {
@40thieves
40thieves / machine.js
Created January 5, 2021 17:59
Generated by XState Viz: https://xstate.js.org/viz
const chatMachine = Machine({
id: "chat",
initial: "idle",
context: {
messages: []
},
states: {
idle: {
on: {
fetch: "fetching",
@40thieves
40thieves / machine.js
Last active January 5, 2021 17:54
Generated by XState Viz: https://xstate.js.org/viz
const chatMachine = Machine({
id: "chat",
initial: "idle",
context: {
messages: []
},
states: {
idle: {
on: {
fetch: "fetching",
BSStrategy = {
version: 4,
displayName: "PocketCasts+",
accepts: {
method: "predicateOnTab",
format: "%K LIKE[c] '*play*.pocketcasts.com*'",
args: ["URL"]
},
toggle: function () {
document.querySelector('.controls [aria-label="Play"]').click()
@40thieves
40thieves / index.html
Last active August 25, 2020 08:55
Demo of async script loading
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Script loading</title>
</head>
<body>
Hello world