This is my current Arch linux installation. I created this for myself, so there's not much description.
What I want out of my install:
- EFI boot partition
- Btrfs filesystem to take advantage of snapshots
- Systemd boot loader
| """ | |
| das-hotkey-generator | |
| ~~~~~~~~~~~~~~~~~~~~ | |
| If you came across this and have no idea what it is, read the article I | |
| wrote here: https://forums.bearbulltraders.com/topic/518-position-sizing | |
| on position sizing, and how I manage my risk. | |
| INTRO | |
| ===== |
| import { Route, Routes } from 'react-router-dom'; | |
| export default function App() { | |
| return ( | |
| <Routes> | |
| <Route element={<Home />} path="/" /> | |
| <Route element={<SomePage />} path="/somepage" /> | |
| </Routes> | |
| ); | |
| } |
| const ForwardRef = React.forwardRef(({}, ref) => { | |
| return <div ref={ref}>Foo</div>; | |
| }); | |
| export default ForwardRef; |
| export default function Foo() { | |
| const { | |
| data, | |
| setData, | |
| } = useSomeContextHook(); | |
| useEffect(async () => { | |
| const response = await api('/some/url'); | |
| setData(response); | |
| }, []); |
| function hasErrorsMutable(values) { | |
| const errors = {}; | |
| if (values.foo === 'bar') { | |
| errors.foo = 'Foo has bar, no bueno'; | |
| } | |
| if (values.bar === 'baz') { | |
| errors.bar = 'Bar has baz, no bueno'; | |
| } | |
| return errors; | |
| } |
| function isInRange(number, range) { | |
| const [start, end] = range.split('-').map((r) => Number(r)); | |
| return number >= start && number <= end; | |
| } | |
| console.log(isInRange(5, '0-10')); | |
| // true | |
| console.log(isInRange(11, '0-10')); | |
| // false |
| function sleep(miliseconds = 1000) { | |
| return new Promise((resolve) => setTimeout(resolve, miliseconds)); | |
| } | |
| // This will log 'foo' and 'bar' immediately. | |
| async function foo1() { | |
| console.log('foo'); | |
| sleep(); | |
| console.log('bar'); | |
| } |
| const myDict = [{ index: 1, area: 1 }, { index: 9, area: 9 }, { index: 2, area: 2 }]; | |
| const z = myDict.reduce((acc, item) => item.area > (acc?.area ?? Infinity) ? item: acc); | |
| console.log(z); |
| const foo = [ | |
| { key: 'one' }, | |
| { key: 'two' }, | |
| ]; | |
| const bar = { | |
| one: 'one', | |
| two: 'two', | |
| }; |