See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
/// VERTICALLY ALIGN LABEL | |
/// Adds a pseudo-element to help vertically align | |
/// text labels in buttons/block-like links without | |
/// using magic numbers | |
/// More: https://ishadeed.com/article/button-label-alignment/ | |
@mixin vertically-align-label() { | |
&::before { | |
content: ''; | |
display: inline-block; | |
vertical-align: middle; |
export const jsonOrText = async (response: Response) => { | |
const text = await response.text(); | |
try { | |
return JSON.parse(text); | |
} catch (err) { | |
return text; | |
} | |
}; |
[ Update 2025-03-24: Commenting is disabled permanently. Previous comments are archived at web.archive.org. ]
Most of the terminal emulators auto-detect when a URL appears onscreen and allow to conveniently open them (e.g. via Ctrl+click or Cmd+click, or the right click menu).
It was, however, not possible until now for arbitrary text to point to URLs, just as on webpages.
Today I wanted to make a recording of me running some commands inside a docker-container.
❯ docker-compose run app bash
root@e9bb2af4dc11:/usr/local/go/src/example.com/dev/project#
Needless to say it looked a bit bland with no colors and a long prompt that prevents me from recording a small terminal and show the full commands I'm
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
alternatively use: http://geoff.greer.fm/lscolors/
The value of this variable describes what color to use for which attribute when colors are enabled with CLICOLOR. This string is a concatenation of pairs of the format fb, where f is the foreground color and b is the background color.
The color designators are as follows:
a black
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |