Skip to content

Commit

Permalink
add found posts
Browse files Browse the repository at this point in the history
  • Loading branch information
chantastic committed Aug 19, 2024
1 parent f544421 commit a23a42c
Show file tree
Hide file tree
Showing 19 changed files with 504 additions and 0 deletions.
21 changes: 21 additions & 0 deletions chan.dev/src/content/guide_steps/homebrew/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,24 @@ chan
## References

-https://gist.github.com/ChristopherA/a579274536aab36ea9966f301ff14f3f#install-a-specific-brewfile -https://github.com/Homebrew/homebrew-bundle?tab=readme-ov-file#usage

<!--
ALT
i am done manually provisioning mac’s and it’s all thanks to homebrew.
if went thru a lot of macs last year.
- i broke a display
- bought a mac mini because i was sick of macbook keyboards
- returned my work macbook after being laid off
- bought a temporary laptop to get thru conference season
- and finally got a new laptop after joining work is
so i’ve provisioned a lot of machines for web work
and it got pretty old.
fortunately, i wasn’t stupid thru all of it and figured out a way to automate the whole thing with one line. apps, fonts, everything
today i’ll share that with you in A chantastic guide to provision mac’s with brew bundle
-->
3 changes: 3 additions & 0 deletions chan.dev/src/content/guide_steps/preparing-for-layoff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: A chantastic guide to preparing for layoff
---
27 changes: 27 additions & 0 deletions chan.dev/src/content/guide_steps/raycast/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
title: A chantastic guide to Raycast
---

<!--
Found notes:
A chantastic guide to Raycast
0- config
- [ ] open meeting (my schedule)
- [ ] my schedule in bar
- [ ] clipboard history
- [ ] emoji picker
- [ ] calc
- [ ]
- [ ] change display
quick links
window management
Karabiner (layer up)
meta
hyper
-->
221 changes: 221 additions & 0 deletions chan.dev/src/content/guide_steps/react-components/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
---
title: A chantastic guide to components
---

## This is a component

```tsx
function AComponent() {
return <>Hello components</>
}
```

## A component can compose other components

```tsx
function AComponent() {
return <h1>Hello components</h1>
}
```

## A component can me bade composeable via the `children` prop

```tsx
function AComponent({children = 'Hello components'}) {
return <h1>{children}</h1>
}
```

## This is another component

```tsx
function App() {
return <main>Hello app</main>
}
```

## One component can render another

```tsx
function App() {
return (
<main>
<AComponent>Hello app</AComponent>
</main>
)
}
```

## Options can be passed to components (these are called props)

```tsx
function App() {
return (
<main>
<AComponent style={color: "red"}>Hello app!</AComponent>
</main>
)
}
```

## But props must be accepted and implemented

```tsx
function AComponent({
style = null,
children = 'Hello components',
}) {
return <h1 style={style}>{children}</h1>
}
```

## props can have default values

```tsx
function AComponent({
style = {textDecoration: 'underline'},
children = 'Hello components',
}) {
return <h1 style={style}>{children}</h1>
}
```

## but these values are not automatically merged with incoming values

## merging values must be done manually as well

```tsx
let defaultStyles = {textDecoration: 'underline'}

function AComponent({
style = null,
children = 'Hello components',
}) {
let mergedStyles = {...defaultStyles, ...style}

return <h1 style={mergedStyles}>{children}</h1>
}
```

## Control of merging can be delegated via prop callback functions — allowing component consumers to modify defaults

```tsx
let defaultStyles = {textDecoration: 'underline'}

function AComponent({
style = null,
children = 'Hello components',
}) {
let mergedStyles =
typeof style === 'function'
? style(defaultStyles)
: {...defaultStyles, ...style}

return <h1 style={mergedStyles}>{children}</h1>
}
```

```tsx
function App() {
return (
<main>
<AComponent
style={(defaultStyles) => ({
...defaultStyles,
...{color: 'red'},
})}
>
Hello app!
</AComponent>
</main>
)
}
```

## Default resolvers, and formatters can be exported for use by component consumers

<!-- TODO (haven't introduced that "consumer" yet) -->

```tsx
let defaultStyles = {textDecoration: 'underline'}

export function resolveDefaultStyles(incomingStyle) {
return typeof incomingStyle === 'function'
? incomingStyle(defaultStyles)
: {...defaultStyles, ...incomingStyle}
}

export function AComponent({
style = null,
children = 'Hello components',
}) {
let mergedStyles = resolveDefaultStyles(style)

return <h1 style={mergedStyles}>{children}</h1>
}
```

## to avoid manually clearlisting all valid HTML attributes, use rest and spread syntax for props

```tsx
export function AComponent({
style = null,
children = 'Hello components',
...restProps
}) {
let mergedStyles = resolveDefaultStyles(style)

return (
<h1 style={mergedStyles} {...restProps}>
{children}
</h1>
)
}
```

## This implementation makes it simple to opt out of defaults (where necessary)

```tsx
function App() {
return (
<main>
<AComponent
style={
(/* ignore defaults */) => {
color: 'red'
}
}
>
Hello app!
</AComponent>
</main>
)
}
```

## `children` can be an array

```tsx
function AComponent({
chant = false,
children = 'Hello components',
}) {
return <h1>{[children, children, children].join(' ')}</h1>
}
```

## `children` can be many types.

```tsx
<AComponent>A string</AComponent>
<AComponent>{123}</AComponent>
<AComponent>{boolean}</AComponent>
<AComponent>[1, 2, 3]</AComponent>
<AComponent>[1, <>2</>, 3]</AComponent>
<AComponent><>stuff</></AComponent>
<AComponent><h1>stuff</h1></AComponent>
```

## So treat `children` as opaque

React.children
20 changes: 20 additions & 0 deletions chan.dev/src/content/guide_steps/sm7b/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: a chantastic guide to theh Shure SM7B
---

This mic is the standard.

Love it or hate it, it is the choice for content creators, podcasters, broadcasters and more.

It’s an extremely compromised mic. But its versatility more than compensates for it.

it looks good on camera. and not for any single reason but a lot of little reasons.

- integrated pop filter
- integrated (and internal) shock mount
- matte black color
- integrated cable routing

I wanted to hate this mic. With degrees in recording arts, I never understood why at-desk creators love this mic so much.

The SM 7B microphone is not a perfect mic. It is the most versatile and that’s because of its shock mount system. I’ve seen a lot of mics attempt to compete on one aspect of the microphone quality. Would in fact it is easy to beat the S7 on one met. The problem is beating it on all metrics background noise isolation signal aesthetic and vibration injection
21 changes: 21 additions & 0 deletions chan.dev/src/content/guide_steps/supermotions/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: A chantastic guide to supermotions
---

vim supermotions

- destructive insert
- change full text object (inside)
- change partial text object (til)
- change line (C)
- change partial line
- (visualizing selections, understanding motion)
- positional insert
- above and below
- begging of line
- first character
- end of line

* jump to occurrence
- next
- previous
3 changes: 3 additions & 0 deletions chan.dev/src/content/guide_steps/surviving-a-layoff/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
title: A chantastic guide to survivg a layoff
---
10 changes: 10 additions & 0 deletions chan.dev/src/content/guide_steps/webcam/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
title: a chantastic guide to looking good on webcam
---

looking good with a webcam

1. external keyboard (you can now get a more flattering angle - put it on boooks. benefit. no more keyboard clunking in someone’s ear)
2. square up with your background (this ads stability to your shot and therefor stabilityvto you)
3. orient your window so that the object of your focus is closest to the webcam
4. get lit.
35 changes: 35 additions & 0 deletions chan.dev/src/content/os/daily.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,38 @@ date: 2023-11-14
## Sleep

https://www.hubermanlab.com/topics/sleep-hygiene

## Daily blocks (potential)

| | |
| ---- | ----------------------------------- |
| 0700 | [Morning routine](#morning-routine) |
| 0800 | Shake. Run. Wash. |
| 0900 | Work block #1: Biggest item first |
| 1000 | " |
| 1100 | " |
| 1200 | " |
| 1300 | Rest block (lunch and texts) |
| 1400 | Work block #2 |
| 1500 | |
| 1600 | |
| 2200 | Sleep |

## Morning routine

- Weigh in
- Drink up (16oz)
- Dress for action
- Move (mobility exercise)
- Set intention for day
- Make shake
- Let cooper out to pee

## Work block #1

- 13 work block 2
- 16 cleanup
- 17 cooper
- 18 family time
- 21 quiet time with nellie
- 22 bedtime routine
17 changes: 17 additions & 0 deletions chan.dev/src/content/posts/excellence-is-viral.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: Excellence is viral
---

About 9 years ago I gave the best man toast at my brother-in-law's wedding.

I'm a decent speaker. And I did a good job.

But I didn't realize how good a job until hearing that brother-in-law deliver the toast at his brother's wedding.

It was the best groomsman toast I'd ever heard. Flawless.

Excellence begets excellence.

When you try hard, take your responsibilities seriously, you set a bar for others to beat. And when they exell, they don't just bless you with their achievement. They bless others.

Do the absolute best you can, in al things. It will come back to you.
Loading

0 comments on commit a23a42c

Please sign in to comment.