Skip to content

Instantly share code, notes, and snippets.

@bikubi
bikubi / quasar-variables-scss.md
Last active April 10, 2019 12:51
Use Quasar variables in SCSS stylesheets (incomplete)

Quasar supports SCSS but the style variables won't be available.
Here's a possible workaround -- incomplete & untested, since I gave up, went ahead and used stylus. (This is guide is primarily directed at future me, should this become more compelling in the future.)

Install stylus-converter

yarn add --dev stylus-converter
@bikubi
bikubi / iptables-nat.service
Created April 11, 2020 11:43
Very simple iptables NAT systemd service
# Very simplistic, use at your own risk. I am using this on Raspbian.
#
# put me into /etc/systemd/system
# systemctl start iptables-nat
# systemctl stop iptables-nat
# systemctl enable iptables-nat
#
# see: https://wiki.archlinux.org/index.php/Internet_sharing
# adapted from: https://github.com/gronke/systemd-iptables/blob/master/etc/systemd/system/iptables.service
@bikubi
bikubi / meltimagesslideshowbob.sh
Created September 5, 2017 08:52
Create a slideshow from images, with blending, using ffmpeg or MLT
#!/bin/bash
# create a slideshow from images, with nice blending
# using MLT or ffmpeg
# adapted from https://superuser.com/a/834035
#
# beware of the ffmpeg command, it eats memory quickly
# USAGE
# 1 pass images as arguments
@bikubi
bikubi / gettexts-fake-update.sh
Last active March 3, 2021 15:04
Helper script for Roots' Sage starter theme: make WPML's String Translation see WordPress's l10n gettext function in PHP Blade templates, like {{ __('Foo', 'domain') }}
#!/bin/bash
# Scans blade templates for WordPress's gettext functions
# so WPML will pick them up for its String Translation.
# (WPML doesn't see something like {{ __('Hello World', 'sage') }}
# Put me into THEME/resources/assets/build
# so $fn will point to THEME/resouces and WPML can see it
# (and it's out of sage's way)
@bikubi
bikubi / wfmugpio.py
Last active March 26, 2021 12:42
Control a web radio stream on a Raspi with GPIO, a button and an LED.
#!/usr/bin/env python
import subprocess as sp
import RPi.GPIO as g
import time
import os
# see http://cyfta.com/?p=8480
# & listen to WFMU! http://wfmu.org
@bikubi
bikubi / README.md
Created March 1, 2019 12:39
Simple Purgecss setup for Roots Sage WordPress starter theme

Why

  1. Sage doesn't come with Purgecss (or uncss, etc.)
  2. Say, we use Bulma -- suddenly dist/main.css grows by 400K!
  3. Let's purge it!
  4. Oh dang, we need to whitelist /\.wp-/, /\.post-type/, /myfancylightbox/...
  5. Wait we are whitelisting pretty much everything from /resource/assets/styles!
  6. Isn't there an option to purge /node_modules/**/* only?
  7. Nope.
  8. purgecss start ignore, strategically placed, to the rescue!