Skip to content

Instantly share code, notes, and snippets.

View danbee's full-sized avatar

Daniel Barber danbee

View GitHub Profile
@danbee
danbee / functions.frag
Created June 22, 2020 02:09
Some GLSL shader functions
vec3 square(vec2 st,vec2 bli,vec2 tri,vec3 color) {
// bottom-left
vec2 bl = step(bli,st);
// top-right
vec2 tr = step(1.0-tri,1.0-st);
float pct = bl.x * bl.y * tr.x * tr.y;
vec3 c = vec3(pct * color);
bind_to_address "any"
music_directory "~/Music/Library"
playlist_directory "~/.mpd/playlists"
db_file "~/.mpd/database"
log_file "~/.mpd/log"
pid_file "~/.mpd/pid"
state_file "~/.mpd/state"
sticker_file "~/.mpd/sticker.sql"
@danbee
danbee / 64squares.club.sh
Last active November 30, 2018 19:55
64squares name resolution
$ whois 64squares.club
% IANA WHOIS server
% for more information on IANA, visit http://www.iana.org
% This query returned 1 object
refer: whois.nic.club
domain: CLUB
organisation: .CLUB DOMAINS, LLC
@danbee
danbee / vimr_leader_s_crash.log
Created November 29, 2018 20:55
Crash log from pressing Leader-S to run a spec
Process: VimR [92263]
Path: /Applications/VimR.app/Contents/MacOS/VimR
Identifier: com.qvacua.VimR
Version: SNAPSHOT-294 (294)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: VimR [92263]
User ID: 501
Date/Time: 2018-11-29 15:53:44.215 -0500
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Control Panel\Mouse]
"SmoothMouseXCurve"=hex:00,00,00,00,00,00,00,00,00,a0,00,00,00,00,00,00,00,40,\
01,00,00,00,00,00,00,80,02,00,00,00,00,00,00,00,05,00,00,00,00,00
"SmoothMouseYCurve"=hex:00,00,00,00,00,00,00,00,66,a6,02,00,00,00,00,00,cd,4c,\
05,00,00,00,00,00,a0,99,0a,00,00,00,00,00,38,33,15,00,00,00,00,00
@danbee
danbee / Rakefile
Last active January 25, 2018 23:09
Rakefile for Jekyll that reads environment variables into config
require 'jekyll'
task default: %w[build]
desc "Build the site"
task :build do
config = Jekyll.configuration({
url: ENV["SITE_URL"],
})
site = Jekyll::Site.new(config)
@danbee
danbee / Rakefile
Created November 30, 2016 17:05
Webpack build with RSpec
# Add your own tasks in files placed in lib/tasks ending in .rake,
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require_relative 'config/application'
Rails.application.load_tasks
task(:default).clear
# Run webpack:build before :spec
task default: ["webpack:build", :spec]
// This #include statement was automatically added by the Particle IDE.
#include "HttpClient/HttpClient.h"
int button_blue = D0;
int button_red = D1;
int button_reset = D2;
int led = D7;
bool latch_blue = false;
@danbee
danbee / private.xml
Created January 13, 2016 11:42
Karabiner configuration to swap Backquote(`) and Section(§) on a UK Filco Tenkeyless.
<?xml version="1.0"?>
<root>
<deviceproductdef>
<productname>FKBN88M_UKB2</productname>
<productid>0x2221</productid>
</deviceproductdef>
<item>
<name>Swap Backquote(`) and Section(§) on Filco Tenkeyless UK</name>
<identifier>private.deviceproductdef</identifier>
wifi.setmode(wifi.STATION)
wifi.sta.config("SSID","password")
-- Send POST when buttons A or B pressed
PIN_BUTTON_A = 3 -- GPIO0
PIN_BUTTON_B = 4 -- GPIO1
TIME_ALARM = 25 -- 0.025 second, 40 Hz
gpio.mode(PIN_BUTTON_A, gpio.INPUT, gpio.PULLUP)