brew install cloudflare/cloudflare/cloudflared
{ | |
"workbench.colorTheme": "Aura Dark", | |
"workbench.iconTheme": "material-icon-theme", | |
"editor.fontFamily": "'Geist Mono', Menlo, Monaco, 'Courier New', monospace", | |
"apc.listRow": { | |
"height": 24, | |
"fontSize": 11 | |
}, | |
"window.titleBarStyle": "native", | |
"apc.font.family": "Geist Mono", |
#!/bin/bash | |
echo -n "Enter a prompt: " | |
read prompt | |
echo -n "Steps (default 10): " | |
read steps | |
if [[ -z "$steps" ]]; then | |
steps=10 |
import React from 'react'; | |
import {View, SafeAreaView, StyleSheet, ScrollView} from 'react-native'; | |
import Svg, {Defs, LinearGradient, Stop, Rect} from 'react-native-svg'; | |
import {MotiView} from 'moti'; | |
const Gradient = () => ( | |
<Svg viewBox="0 0 100 100"> | |
<Defs> | |
<LinearGradient id={'gradient'} x1={'0%'} y1={'0%'} x2={'100%'} y2={'0%'}> | |
<Stop stopOpacity={0} stopColor={'rgb(225, 225, 225)'} offset={'0%'} /> |
import { defineConfig } from 'vite'; | |
import laravel from 'laravel-vite-plugin'; | |
import fs from 'fs'; | |
import { resolve } from 'path'; | |
import { homedir } from 'os'; | |
let host = 'sendstack.test'; | |
let homeDir = homedir(); | |
let serverConfig = {}; |
This is a writedown of how I installed my raspberry pi(s).
The base is a Proxmox, so I don't have to worry about reformat the SD card every time I wanna try out something new, as I can start VMs and LXC containers, as well as Docker containers once it's configured properly.
Note: Those files are versioned, so you can always look what changed from time to time.
- Pimox
<?php | |
Builder::macro('deferredPaginate', function ($perPage = null, $columns = ['*'], $pageName = 'page', $page = null) { | |
$model = $this->newModelInstance(); | |
$key = $model->getKeyName(); | |
$table = $model->getTable(); | |
$paginator = $this->clone() | |
// We don't need them for this query, they'll remain | |
// on the query that actually gets the records. |
Home Assistant has VERY IN-DEPTH DOCUMENTATION NOW...
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:
- Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
- In the Powershell interface type
diskpart
to enter the disk partition tool. - Type
list disk
to see all disks listed. - Select the USB drive by typing
select disk [NUMBER]
. Be careful to select the correct drive. - Type
clean
. An error will occur if you have the drive folder open, close the window and repeat the command if this happens. - Type
create partition primary
. - Type
format fs=ntfs quick
to format the drive (you can also choose to setfs=fat32
). - Type
active
.
I started using React Native in September 2018. I always forget some things when I build new apps, so I'll keep track of the gotchas on this post.
Some topics, such as navigation, will be fundamental to how I think about apps. Others, will be one-line helpers that make apps work more smoothly.
It's gotten to the point where I find my own answers from 6 months before on certain Github issues.
I'll keep adding over time as I think of more. If anyone thinks these topics would be useful, let me know and I'll elaborate.
I have made libraries to address a number of the topics here, from navigation to design.