Skip to content

Instantly share code, notes, and snippets.

View ivanbanov's full-sized avatar
:octocat:
undefined

Ivan Banov ivanbanov

:octocat:
undefined
View GitHub Profile
const fs = require("fs");
const childProcess = require("child_process");
childProcess.exec("./node_modules/.bin/elm-analyse", (e, out) => {
let file;
let all = {};
for (let line of out.split("\n")) {
if (line.startsWith("-")) {
file = line.slice(2);
continue;
@yoosuf
yoosuf / stopnremoveall.sh
Created August 14, 2019 01:48
Stop and remove all docker containers and images (Docker)
# List all containers (only IDs)
docker ps -aq
# Stop all running containers
docker stop $(docker ps -aq)
# Remove all containers
docker rm $(docker ps -aq)
# Remove all images
@roginfarrer
roginfarrer / nestedGlobalStyle.ts
Last active July 2, 2024 13:04
nested selectors for vanilla extract globalStyle
import { globalStyle, GlobalStyleRule } from "@vanilla-extract/css";
interface RecursiveGlobalStyle {
[k: string]: GlobalStyleRule | RecursiveGlobalStyle;
}
function globalUtil(selector: string, styles: RecursiveGlobalStyle) {
const write = (
key: string[],
value: RecursiveGlobalStyle | GlobalStyleRule
const {htmlTagNames} = require('html-tag-names')
// get a list of all known html tag names and convert it into a map example:
// {body: true, head: true, li: true, h1: true, p: true} and so on
const tags = htmlTagNames.reduce((res, tag) => {
res[tag] = true
return res
}, {})