Skip to content

Instantly share code, notes, and snippets.

View loklaan's full-sized avatar
🐛
"You find the weirdest bugs 🎖" – Other Engineers

Lochlan Bunn loklaan

🐛
"You find the weirdest bugs 🎖" – Other Engineers
View GitHub Profile
@loklaan
loklaan / README.md
Last active September 27, 2023 02:21
Jittering Particles

#Canvas 2D Particles

With no external libraries, just the standard browser features, you can make cool 2d renderings.

Usage

Enable and disable mouse movement controlled Hue:

window.mouseEffect(bool isOn)
@loklaan
loklaan / readme.md
Last active September 16, 2015 22:13
Switch specific Gnome3 applications to GTK Dark Theme, using Devilspie2

Watch applications and apply gnome dark themes

This script is for devilspie2. It will match desired windows by class, and then apply the dark theme on them.

Install

Move specific-dark-theme-applications.lua to ~/.config/devilspie2/.

Edit the desiredWindowClasses variable in the file to change which applications this script matches.

@loklaan
loklaan / README.md
Last active January 12, 2019 13:58
Knockout + React

Knockout & React, in harmony

Bless

@loklaan
loklaan / README.md
Last active September 13, 2015 05:53
Singleton process via sockets

Singleton Process

An application that manages singleton process.

It will print any cli arguments used when executing additonal instances of the application.

Example

$ node SingletonApplication.js
@loklaan
loklaan / MixinClasses.js
Created October 6, 2015 02:42
ES6 Class extending Mixins
/**
* An implementation for composing classes together.
*
* The composition part looks like below, using the mixin function:
*
* class ComposedClass extends mixin(ParentClass, ...classGenerators) {
* render() {
* // Note: To call something from renderTextMixin, use super
* super.render()
* this.renderText('Hello world');
@loklaan
loklaan / a. General Electronics.md
Last active January 31, 2016 07:18
Electronics / IoT
@loklaan
loklaan / centered.md
Last active March 12, 2019 03:57 — forked from ProjectCleverWeb/centered.md
Example of how to do centered text and images in Githb Flavored Markdown
@loklaan
loklaan / jest.config.js
Last active November 15, 2019 06:31
Rolling your own babel-jest
/*
Up to you how to let Jest consume this config. I ended up stringifying the export and supplying it to a terminal command.
*/
const path = require('path')
module.exports = {
transform: path.resolve(__dirname, './my-babel-jest.js')
}
@loklaan
loklaan / keybase.md
Last active July 22, 2021 23:45
keybase.md

Keybase proof

I hereby claim:

  • I am loklaan on github.
  • I am loklaan (https://keybase.io/loklaan) on keybase.
  • I have a public key ASDG_WJapMI7NH_8RcffoZmcsue-k7v9z2QAveZanQioigo

To claim this, I am signing this object:

@loklaan
loklaan / bash-lib.sh
Last active September 15, 2019 06:19
Adding to Lerna managed packages
#! /usr/bin/env bash
#/
#|-------------------------------------------------------------------------------
#| Util Lib for Bash
#|-------------------------------------------------------------------------------
#|
#| Includes:
#| - Shell color escapes
#| - Function to print pretty errors for missing bin's