Skip to content

Instantly share code, notes, and snippets.

View YellowOnion's full-sized avatar

Daniel Hill YellowOnion

View GitHub Profile
import Codec.Picture (readPng, pixelAt, writePng, generateImage)
import Codec.Picture.RGBA8 (fromDynamicImage)
main :: IO ()
main = do
imageLoad <- readPng "in_minecraft.png"
case imageLoad of
Left err -> putStrLn err
Right image -> do
import pyHook, pythoncom
import rtmidi_python as rtmidi
# this app will list all MIDI devices and associated numbers
# Pick the correct number associated, and restart the app.
MIDI_DEVICE = 1
# key codes helpers
KP_7 = 103
KP_8 = 104
>cabal exec runhaskell Test.hs
Test.hs: Field time not found in GLSL program
@YellowOnion
YellowOnion / volume.js
Created June 16, 2015 03:05
Set volume of html5 video and audio tags (Bandcamp, SoundCloud, Chrome inbuilt player etc.)
javascript:(function () {
var vol = 1.0;
var a = document.getElementsByTagName('audio');
var b = document.getElementsByTagName('video');
for (i =0; i < a.length; i++) {
a[i].volume=vol;
}
for (i =0; i < b.length; i++) {
b[i].volume=vol;
}
from libqtile.manager import Key, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget
# I have two screens, each of which has a Bar at the bottom. Each Bar has two
# simple widgets - a GroupBox, and a WindowName.
screens = [
Screen(
bottom = bar.Bar(
[
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
bzr: ERROR: Invalid http response for http://bazaar.launchpad.net/~launchpad-p-s/sofastatistics/main/.bzr/repository/packs/cafca3c20c348fad738e3e4f705e4b1f.pack: Expected a boundary (X=hj,UNln0X6Gy:i9En0) line, got ''
> bzr branch lp:sofastatistics
Permission denied (publickey).
bzr: ERROR: Connection closed: Unexpected end of message. Please check connectivity and permissions, and report a bug if problems persist.
···> ./qtile/qtile:46: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6
parser.error(v.message)
Usage: qtile [options]
qtile: error: __init__() takes exactly 4 arguments (2 given)
from libqtile.manager import Key, Screen, Group
from libqtile.command import lazy
from libqtile import layout, bar, widget
# I have two screens, each of which has a Bar at the bottom. Each Bar has two
# simple widgets - a GroupBox, and a WindowName.
screens = [
Screen(
bottom = bar.Bar(
[
# dx, dy, dw, dh,bw, colour
{'Chromium' :( 0, 0, 1024, 1200, 0, None),
'Xchat' :(1024, 720, 896, 480, 0, None) }
{'conversation':(1024, 000, 600, 720, 0, None),
'buddy_list' :(1624, 000, 296, 720, 0, None) }
# this is size table for my internet setup in pixel
# I'm now going to calculate this in too boxes
# there are 15 horizontal, boxes, and 5 vertical
# I'll use this to create a table for slighly more
# flexible system