Skip to content

Instantly share code, notes, and snippets.

View ctalkington's full-sized avatar

Chris Talkington ctalkington

View GitHub Profile
# pylint: disable=W0621
"""Asynchronous Python client for IPP."""
import asyncio
from pyipp import IPP
async def main():
"""Show example of connecting to your IPP print server."""
async with IPP("ipp://HP79EC40.local:631/ipp/printer") as ipp:
@ctalkington
ctalkington / grunt.js
Created September 12, 2012 02:44
Grunt Glob to Multi Files Object
// gruntfile dropin used to build a grunt files object with 1:1 structure
function globToMultiFiles(glob, dest, options) {
var path = require('path');
grunt.util = grunt.util || grunt.utils;
dest = grunt.template.process(dest);
options = grunt.util._.defaults(options || {}, {
cwd: '',
@ctalkington
ctalkington / bulb_75w_rgbw_qpw06.yaml
Last active November 23, 2021 12:24
Merkury A21 75W Bulb ESPHome Config (requires v1.14+)
esphome:
name: bulb_75w_rgbw_qpw06
platform: ESP8266
board: esp01_1m
wifi:
ssid: 'YOURWIFISSID'
password: 'YOURWIFIPASSWORD'
logger:
#!/bin/bash
if ! [ -x "$(command -v jq)" ]; then
printf "\x1B[31m[ERROR] jq is not installed.\x1B[0m\n"
exit 1
fi
if ! [ -x "$(command -v sed)" ]; then
printf "\x1B[31m[ERROR] sed is not installed (only GNU sed works).\x1B[0m\n"
exit 1
@ctalkington
ctalkington / Gemfile
Last active May 16, 2023 20:19
Nginx, Sinatra, and Puma.
source :rubygems
gem "puma"
gem "sinatra"