Skip to content

Instantly share code, notes, and snippets.

View desertblade's full-sized avatar

Ben Williams desertblade

View GitHub Profile
@aurman
aurman / enpointExample.groovy
Created March 27, 2014 17:33
SmartThings API Endpoint Example
/**
* App Endpoint API Access Example
*
* Author: SmartThings
*/
preferences {
section("Allow Endpoint to Control These Things...") {
input "switches", "capability.switch", title: "Which Switches?", multiple: true
input "locks", "capability.lock", title: "Which Locks?", multiple: true
@oanhnn
oanhnn / using-multiple-github-accounts-with-ssh-keys.md
Last active August 4, 2025 08:45
Using multiple github accounts with ssh keys

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@fuka
fuka / amazon_shortcodes.html
Created December 10, 2016 10:50
Amazonの商品紹介用HugoのShortcodes
{{ $associateId := "YOUR_ASSOCIATE_ID" }}
{{ $itemId := index .Params 0 }}
{{ $json := getJSON "http://example.com/amazon/lookup.php?item=" $itemId }}
<div class="amazon-shortcode-box">
<div class="amazon-shortcode-image">
<a href="http://www.amazon.co.jp/exec/obidos/ASIN/{{ $itemId }}/{{ $associateId }}/" name="amazon-shortcode" target="\_blank">
<img src="{{ $json.image_url }}" alt="{{ $json.title }}" />
</a>
</div>
@max-mapper
max-mapper / links.json
Last active November 11, 2023 03:11
all wikipedia zim torrent links
- alias: holiday_lights
initial_state: True
trigger:
platform: time
at: "20:40:00"
# platform: sun
# event: sunset
action:
service: input_select.select_option
entity_id: input_select.holiday
@AdamNaj
AdamNaj / about.md
Last active March 12, 2025 21:47
Z Wave Graph for Home Assistant
@ndavis
ndavis / oktaLogin.js
Created November 7, 2019 03:38
Cypress Custom Command for Okta Login
Cypress.Commands.add('loginOkta', () => {
const optionsSessionToken = {
method: 'POST',
url: Cypress.env('session_token_url'),
body: {
username: Cypress.env('username'),
password: Cypress.env('password'),
options: {
warnBeforePasswordExpired: 'true'
}
@brianhanifin
brianhanifin / gist:0787b85749d6460a45eb2b17cba43b88
Created August 6, 2020 14:26
Script: inovelli_led, using the new OZW integration
# Calculation References:
# https://nathanfiscus.github.io/inovelli-notification-calc/
# https://community.inovelli.com/t/home-assistant-2nd-gen-switch-rgb-working/168/62
# https://docs.google.com/spreadsheets/u/1/d/1SGJrJHCUtz8AzznWL_mLCTJjjr2U0IpltcUkRr7N_6M/edit?usp=sharing
#
# Changes:
# July 22, 2020: Incorporating some changes from Kevin Schlichter.
# https://github.com/kschlichter/Home-Assistant-Inovelli-Red-Dimmer-Switch
#
# August 6, 2020: Converting `zwave` service to `ozw` service due to the new Z-Wave integration.