Skip to content

Instantly share code, notes, and snippets.

@efc
efc / cmyk2rgb.applescript
Last active December 14, 2015 06:49
An AppleScript to convert a CMYK file to RGB using the ColorSync Utility. For some reason this works while sips --matchToWithIntent leaves the file all washed out and CMYKish. This script assumes a CMYK image is already open and the top window in ColorSync. I use it in combination with Automator.
tell application "System Events"
tell process "ColorSync Utility"
set visible to true
tell pop up button 1 of group 1 of front window
click
tell menu 1
click menu item "Match to Profile"
end tell
end tell
tell menu button 1 of group 1 of front window
@efc
efc / class-submittestaddon.php
Last active June 16, 2016 16:21
Submit Test Add-On for Gravity Forms
<?php
GFForms::include_addon_framework();
class SubmitTestAddOn extends GFAddOn {
protected $_version = "1.0";
protected $_min_gravityforms_version = '1.9';
protected $_slug = 'submittestaddon';
protected $_path = 'submittestaddon/submittestaddon.php';
@efc
efc / AutoEmbed.rb
Created March 7, 2019 20:32
AutoEmbed.rb is a plugin for Jekyll that automatically finds and renders embeds for any "naked URL" on the site.
# AutoEmbed plugin for Jekyll
#
# Created by Eric Celeste for Tenseg LLC
# March 2019
#
# License: MIT
#
# This plugin uses the ruby-oembed library to look up an oembed for
# any "naked URL" (a URL in a paragraph by itself). If the oembed
# is found, then the HTML for the oembed is presented. If there is
@efc
efc / fix-wp-admin-links.php
Last active February 11, 2021 18:47
Fixes wp-admin links for WPS Hide Login
@efc
efc / code.py
Last active July 8, 2022 16:12
Controller for lock based on Adafruit ESP32-S2 Feather
# Lock via wsgi server on Adafruit Feather ESP32S2
# SPDX-FileCopyrightText: 2021 Tenseg LLC
# SPDX-License-Identifier: MIT
# Save to CIRCUITPY as code.py
# Adafruit ESP32-S2 Feather pinouts...
# - (GND) to ground (and to LED resistor)
# - (A1) to red LED
# - (A2) to servo (TowerPro SG-5010) yellow data
# - (USB) to servo red power