Skip to content

Instantly share code, notes, and snippets.

@connornishijima
connornishijima / christmas_light_fixer.h
Created December 9, 2023 22:05
Christmas Light Fixer (Incandescent LUT)
// This function reduces harsh blue tones in RGB LED lights, bringing
// them closer to the look of retro tinted incandescent bulbs.
//
// All input colors to the christmas_light_fixer() function are multiplied
// by a LUT of a warm white, reducing the power of the blue spectrum while
// preserving the brightness of the yellow spectrum.
CRGB christmas_light_fixer( CRGB input_color ){
CRGB incandescent_lookup = CRGB( 255, 113, 40 );
CRGB out_color = input_color;
// cc $(pkg-config --cflags --libs libudev) udev_find_serial_by_vid_pid.c -o udev_find_serial_by_vid_pid
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libudev.h>
int main(int argc, char **argv)
{
if (argc != 3) {
import logging
import asyncio
from aramanth import *
from ....support.endpoint import *
from ....gateware.pads import *
from ....gateware.pll import *
from ... import *
class VideoIkea2WireSubtarget(Elaboratable):
@haku
haku / README.markdown
Last active December 30, 2018 13:50 — forked from qingshan/autosshd
autosshd

autosshd

Install

git clone https://gist.github.com/6322759.git autosshd
cd autosshd
sudo ./install
@henrik-muehe
henrik-muehe / Dockerfile
Created August 5, 2013 11:47
Allows installing the ubuntu "fuse" package without creating any devices. Used to install packages on docker which require fuse but do not actively use it.
...
# Fake a fuse install
RUN apt-get install libfuse2
RUN cd /tmp ; apt-get download fuse
RUN cd /tmp ; dpkg-deb -x fuse_* .
RUN cd /tmp ; dpkg-deb -e fuse_*
RUN cd /tmp ; rm fuse_*.deb
RUN cd /tmp ; echo -en '#!/bin/bash\nexit 0\n' > DEBIAN/postinst
RUN cd /tmp ; dpkg-deb -b . /fuse.deb
@garthk
garthk / bbb.pp
Created March 26, 2012 03:46
bigbluebutton recipe for Puppet (requires manual fixup: see comments)
class bbb($bbb_hostname = $fqdn, $salt = "d34db33fba5eba11f01dab1e5ca1ab1e") {
exec { "dist upgrade":
refreshonly => true,
command => "/usr/bin/apt-get dist-upgrade",
}
exec { "update and dist upgrade":
refreshonly => true,
command => "/usr/bin/apt-get update",
notify => Exec["dist upgrade"],
}
@niallo
niallo / ubuntu-lucid-node-zeromq
Created March 8, 2012 21:02
Puppet class recipe to install Node.JS & ZeroMQ on Ubuntu 10.04 LTS / Lucid
class nodejs {
Package { ensure => "installed" }
$pkglist = [ "python-software-properties" ]
package { $pkglist: }
$apt-base = "/etc/sources.list.d/chris-lea"
Exec { require => package["python-software-properties"] }