CSS Modules lets you write and use simple class names rather than remembering and maintaining long unique class names for every component. CSS Modules mutates all of your classnames from each partials into new, completely unique classnames that will not conflict when they are bundled together into your main CSS file. Then, a JSON file is generated that maps the happy classnames from each file to the unique classname in the combined file. You load this map in PHP, and begin using the easy-to-remember classnames as you wish.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { match, P } from "ts-pattern"; | |
const headerBlocType = { | |
Header: "header", | |
Paragraph: "paragraph", | |
Image: "image", | |
} as const; | |
interface HeadBlockData { | |
text: string; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Drop me a line if you wanna see this as a proper merb plugin. | |
class Merb::Controller | |
ITEM_RANGE = /^items=(\d+)-(\d+)$/ | |
RANGE = /^(\d+)-(\d+)$/ | |
# Displays a collection resource (using Merb's display method) while supporting requests for sub-ranges of items in a RESTful fashion. | |
# This supports a subset of the HTTP/1.1 spec for content ranges, using a custom range unit 'items'. eg: | |
# GET /collection HTTP/1.1 | |
# Range: items 10-20 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/id_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/github_rsa | |
ssh-keygen -t rsa -b 4096 -N '' -C "rthijssen@gmail.com" -f ~/.ssh/mozilla_rsa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// [dependencies] | |
// futures = "0.1.27" | |
// http = "0.1.17" | |
// tokio = "0.1.21" | |
// tower-request-modifier = { git = "https://github.com/tower-rs/tower-http" } | |
// tower-grpc = { version = "0.1.0", features = ["tower-hyper"] } | |
// tower-service = "0.2" | |
// tower-util = "0.1" | |
// tokio-rustls = "0.10.0-alpha.3" |
Dockerfile: blueprint for an image that defines what goes on in the environment inside a container.
Image: an executable package that includes everything needed to run an application --the code, a runtime, libraries, environment variables, and configuration files.
Container: a runtime instance of an image --what the image becomes in memory when executed (that is, an image with state, or a user process).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
println!("Hello"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Write a function called greet | |
* which takes a name parameter | |
* and returns a String with a greeting | |
* "Hello {name}!" | |
*/ |