Skip to content

Instantly share code, notes, and snippets.

View rubicon's full-sized avatar
💯

Dax Davis rubicon

💯
View GitHub Profile
@rubicon
rubicon / custom_iterm_script.applescript.scpt
Last active November 28, 2024 02:35
[Alfred Custom iTerm Script]Script to allow Alfred to use ITerm as its terminal #Utilities #Alfred
-- Set this property to true to always open in a new window
property open_in_new_window : false
-- Handlers
on new_window()
tell application "iTerm" to create window with default profile
end new_window
on new_tab()
tell application "iTerm" to tell the first window to create tab with default profile
@rubicon
rubicon / TitleCase.pl
Last active December 13, 2020 19:47 — forked from gruber/TitleCase.pl
TitleCase.pl #Perl, #Programming, #Development
#!/usr/bin/perl
# This filter changes all words to Title Caps, and attempts to be clever
# about *un*capitalizing small words like a/an/the in the input.
#
# The list of "small words" which are not capped comes from
# the New York Times Manual of Style, plus 'vs' and 'v'.
#
# 10 May 2008
# Original version by John Gruber:
@rubicon
rubicon / reboot.sh
Created May 27, 2021 15:53 — forked from mbierman/reboot.sh
Restart Homebridge
#!/bin/sh
# Variables
update="false"
reboot="false"
hostname=$(hostname)
docker="/.dockerenv"
dir=$(dirname "$0")
IFTTTKEY="$(cat $dir/rebootdata.txt | grep IFTTTKEY | cut -f2 -d "=" )"
IFTTTrigger="$(cat $dir/rebootdata.txt | grep fpass | cut -f2 -d "=" )"
@rubicon
rubicon / discover_scenes.py
Created October 29, 2021 18:07 — forked from sdague/discover_scenes.py
Discover hue groups and scenes
#!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@rubicon
rubicon / espvibration1.yaml
Last active November 28, 2024 02:26 — forked from jeffehobbs/vibration_sensor_ESP32_HA_how_to.txt
Vibration Sensor for ESPHome/Home Assistant
# Names and defines the hardware
esphome:
name: espvibration1
platform: ESP32
board: nodemcu-32s
# Defines WiFi network/password
wifi:
ssid: "YOUR WIFI NETWORK"
password: "YOUR WIFI PASSWORD"
@rubicon
rubicon / actionable-notifications-subflow-for-ios.json
Created December 31, 2021 07:27 — forked from sstratoti/actionable-notifications-subflow-for-ios.md
iOS Subflow for HomeAssistant Companion notifications
[
{
"id": "6dc0247c.d7210c",
"type": "subflow",
"name": "iOS Actionable Notification",
"info": "[Documentation](https://zachowj.github.io/node-red-contrib-home-assistant-websocket/cookbook/actionable-notifications-subflow-for-ios.html)\n",
"category": "",
"in": [
{
"x": 100,
@rubicon
rubicon / panel-redirect.js
Created November 3, 2022 06:55 — forked from Acqua-H/panel-redirect.js
Add items to the Home Assistant sidebar to any path in Home Assistant
/*************************************************************************************************************************
* Purpose: Add items to the Home Assistant sidebar to any path in Home Assistant
* Many thanks to balloob https://gist.github.com/balloob for his initial code (see link in Change Log)
* -------------------------------------------------------------------------------------------------------
* Resources and References:
* - Current Code Source https://gist.github.com/Acqua-H/a33ef5bd5a95f14c5888494565bb0436
* - HA Forum Thread https://community.home-assistant.io/t/how-to-add-a-restart-home-assistant-button-to-sidebar/214179/2
* - Acqua https://github.com/Acqua-H/ | https://community.home-assistant.io/u/acqua/
* -------------------------------------------------------------------------------------------------------
* Change Log:
@rubicon
rubicon / gravity_forms_get_credit_card_details.php
Last active November 28, 2024 02:20 — forked from DeveloperWil/Gravity Forms Get Credit Card Details
Enables the credit card fields for Gravity Forms and provides a function to get the credit card details which are not available through the filter $form or $entry
<?php
//Turn on our credit card field for admin and front-end
add_action("gform_enable_credit_card_field", "enable_creditcard");
function enable_creditcard($is_enabled)
{
return true;
}
//Email encoded card details when the form is submitted.
add_action('gform_after_submission', 'email_encoded_cc', 10, 2);
function email_encoded_cc($entry, $form)
@rubicon
rubicon / sup-sub.css
Last active November 28, 2024 02:55 — forked from unruthless/CSS for <sup> and <sub>
CSS: <sup> and <sub>
sub,
sup {
/* Specified in % so that the sup/sup is the
right size relative to the surrounding text */
font-size: 75%;
/* Zero out the line-height so that it doesn't
interfere with the positioning that follows */
line-height: 0;
@rubicon
rubicon / featured-image-in-quick-edit.php
Created December 21, 2023 10:27 — forked from bagerathan/featured-image-in-quick-edit.php
[Featured image in quickedit] #wp