Skip to content

Instantly share code, notes, and snippets.

@lambdahands
lambdahands / _readme.md
Created September 28, 2015 17:09
FlowType and CSS Modules

Huh?

So basically FlowType doesn't know about CSS Modules, a really handy way of dealing with the plagues of CSS in codebases (global variables and dependency wackiness mainly).

What WebPack allows us to do is "require" CSS files and use their class names:

import styles from "my_styles.css";
import React from "react";
@sheershoff
sheershoff / dcsl
Last active June 14, 2023 18:05
Docker-compose logs sorted by time
#!/bin/bash
usage="Input piped docker-compose logs -t, or a file created from this command, to show logs lines sorted by time.\n\n Usage:\n\n $(basename "$0") [-h|--help] - this message\n $(basename "$0") - runs default docker-compose logs -t and sorts'em\n docker-compose logs -t|$(basename "$0") - pipe logs to this command\n $(basename "$0") my-compose.log - or choose file with logs to display\n\n"
[ $# -ge 1 -a -f "$1" ] && input="$1" || input="-"
case "$1" in
-h|--help) printf "$usage"
exit
;;
esac
if [ -t 0 ]; then
docker-compose logs -t|sort -t "|" -k +2d
@natrim
natrim / convert.sh
Last active March 18, 2024 09:04
Simple conversion script that converts Godot html5 export to gzipped version, with decompressing wasm and pck files using pako
#!/bin/bash
### usage ./convert.sh game
## where game is baseName of the export
if [ ! "$1" ]; then
read -p 'Game name: ' game
else
game="$1"
fi