- Set Light mode
defaults write -g NSRequiresAquaSystemAppearance -bool Yes
- Log out and log back in
- Set Dark mode
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
// | |
// Figma project stats | |
// Pulls statistics like number of files, frames, versions etc for a project. | |
// | |
// Usage: | |
// export FIGMA_API_ACCESS_TOKEN='your-token' | |
// node figma-project-stats.js <project-id> | |
// | |
// You can generate tokens in your account settings or at | |
// https://www.figma.com/developers/explorer#personal-access-token |
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
// 1. Make sure you have imagemagick installed (`brew install imagemagick` on macos) | |
// 2. Visit https://www.figma.com/developers/api#authentication and click "Get personal access token" | |
// 3. Add your file links below, replacing the example links | |
// 4. Run with `FIGMA_API_TOKEN=YOUR_TOKEN_FROM_STEP_2_HERE node fig-thumbnails.js` | |
// [ host:string, filekey:string ][] | |
const fileKeys = ` | |
https://www.figma.com/file/FILEKEY/ | |
https://staging.figma.com/file/FILEKEY/ | |
https://www.figma.com/file/FILEKEY/ |
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
// cc -std=c11 miniast.c -o miniast && ./miniast | |
#include "xcommon.h" | |
ASSUME_NONNULL_BEGIN | |
typedef enum AKind { | |
AKindInt, // 123 | |
AKindAdd, // + | |
AKindSub, // - | |
AKindMul, // * | |
} AKind; |
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
#!/bin/ash | |
# list installed packages sorted by file size | |
apk info -e -s \* >/tmp/apksize | |
awk 'NR % 3 == 1' /tmp/apksize | cut -d ' ' -f 1 > /tmp/apkname | |
awk 'NR % 3 == 2' /tmp/apksize > /tmp/apksize2 | |
while read -r n unit; do | |
B=$n | |
case "$unit" in |
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
// using a node-native Script with a new context, one can retrieve that context thus eliminating the need for "exports": | |
database = { | |
host: 'localhost', port: 1234 | |
// unixsocket: '/tmp/foo.sock' | |
} | |
debug = true | |
log_level = exports.debug ? 2 : 1 | |
cats = ['joe', 'bastard', 'busta'] |
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
SRCROOT := $(shell pwd) | |
SYSTEM := $(shell uname -s) | |
OBJDIR := .build | |
SKIA_DIR := skia | |
SOURCES := remote-render.cc | |
# skia-compatible config sourced from skia/out/Release/obj/remote_demo.ninja | |
# via temporarily configuring Skia with skia_enable_tools=true |
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
// Find the latest version of this script here: | |
// https://gist.github.com/rsms/a8ad736ba3d448100577de2b88e826de | |
// | |
const EM = 2048 | |
interface FontInfo { | |
familyName :string | |
styleName :string | |
unitsPerEm :int | |
ascender :int |
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
[Unit] | |
Description = Foo HTTP server | |
Requires = foo.socket | |
After = multi-user.target | |
[Service] | |
User = www-data | |
Group = www-data | |
WorkingDirectory = /var/foo | |
ExecStart = /var/foo/bin/foo-server |
By Don Libes
Originally appeared in the Nov. 1990 "C User's Journal" and is also reprinted as Chapter 35 of "Obfuscated C and Other Mysteries", John Wiley & Sons, 1993, ISBN 0-471-57805-3. http://www.wiley.com/compbooks/m3.html.
This column will describe a set of functions to implement software
NewerOlder