HTTP Verb Route Model->method() Description
-----------------------------------------------------------------------------------------
GET /posts posts->index() display a list of all posts
GET /posts/new posts->new() return an HTML form for creating a new post
POST /posts posts->create() create a new post
GET /posts/:id posts->show() display a specific post
GET /posts/:id/edit posts->edit() return an HTML form for editing a post
PATCH/PUT /posts/:id posts->update() update a specific post
DELETE /posts/:id posts->destroy() delete a specific post
#[cfg(test)] | |
use mockall::{automock, predicate::*}; | |
pub struct Visa {} | |
#[cfg_attr(test, automock)] | |
pub trait Chargable { | |
fn charge_credit_card(&self) -> u32; | |
} |
! youtube shorts | |
www.youtube.com###guide-content #endpoint[title="Shorts"]:upward(ytd-guide-entry-renderer) | |
www.youtube.com###items #endpoint[title="Shorts"]:upward(ytd-mini-guide-entry-renderer) | |
www.youtube.com##ytd-browse ytd-grid-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/)) | |
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/)) | |
www.youtube.com##ytd-search ytd-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/)) | |
www.youtube.com##ytd-watch-next-secondary-results-renderer ytd-compact-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer:has-text(/\s(0:\d\d|1:0\d)\s/)) | |
www.youtube.com##ytd-browse ytd-grid-video-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer[aria-label="Shorts"]) | |
www.youtube.com##ytd-browse ytd-rich-item-renderer:has(span.ytd-thumbnail-overlay-time-status-renderer[aria-label="Shorts"]) | |
www.y |
// Theo's Enum Avoidance, Implemented | |
// https://www.youtube.com/watch?v=Anu8vHXsavo | |
// don't do this --------------------------------------------------- | |
enum UserRole { | |
User, | |
Admin, | |
Staff | |
} |
{ | |
// for next, remix and solid index routes that uses the directory name for the component name | |
"export default function": { | |
"prefix": "edf", | |
"body": [ | |
"export default function ${TM_DIRECTORY/^.+\\/(.*)$/${1:/pascalcase}/}() {", | |
"\treturn(", | |
"\t\t${0}", | |
"\t)", | |
"}" |
// app/services/notice.server.ts | |
const { getSession, commitSession, destroySession } = | |
createCookieSessionStorage({ | |
cookie: { | |
name: "notice", | |
sameSite: "lax", | |
path: "/", | |
httpOnly: true, | |
secrets: [process.env.COOKIE_SECRET || "CHANGEME"], | |
secure: process.env.NODE_ENV === "production", |
Not a whole lot of info out there about this. I understand that bun is in beta at the moment. I just wanted to see where it's at. Remix doesn't really care too much about the runtime since it's tied to standard APIs. However, it's still SSR so ... how to run in prod etc?
bun.sh has the instructions but basically run the curl/bash one-liner command even if you are on zsh
or fish
.
bun --version
0.2.2
Software development or related videos with a lasting impact on me. Usually the videos have some novel idea or something very unique at the time when compared to many tech talks.
I'm describing them here for more context (what's the big deal, I've seen this) or to save you some time (for example Linus + Git at Google).
Each video is linked directly but the playlist is the thing most updated.
I can't spoil why this talk is very clever. You'll have to watch it.
A Summary of AMD's Zen Core Tick-Tock progression of multi-threading and single core performance. Each Zen generation is compared to the last one.
Taken from Broken Silicon 169.
| Generation | Single Threading | Multi-Threading |