Skip to content

Instantly share code, notes, and snippets.

@ksaio
ksaio / panel-redirect.js
Created December 29, 2020 00:59 — forked from balloob/panel-redirect.js
Add redirects to the Home Assistant sidebar to any place in Home Assistant
/*
Add a link to the sidebar to any path in Home Assistant
Put this file in <config>/www/panel-redirect.js
In configuration.yaml:
panel_custom:
- name: panel-redirect
# url_path needs to be unique for each panel_custom config
require 'facter'
if File.exists?(“/etc/digitalocean”)
File.open(“/etc/digitalocean”).each do |line|
var = nil
value = nil
var = $1 and val = $2 if line =~ /^(.+)=(.+)$/
if var != nil && val != nil
@ksaio
ksaio / site.pp
Created September 7, 2014 13:19
site.pp
node default {
Package { allow_virtual => false, }
hiera_include('classes')
}
@ksaio
ksaio / keybase.md
Created August 16, 2014 21:51
keybase

Keybase proof

I hereby claim:

  • I am ksaio on github.
  • I am ksa (https://keybase.io/ksa) on keybase.
  • I have a public key whose fingerprint is B0C7 F2EC 5A32 CDFF 41AE 82CA 7453 792F 2A2B 602D

To claim this, I am signing this object:

@ksaio
ksaio / urls.py
Created March 17, 2013 23:34
...
url(r'^/(?P<folder>.*)', 'browse.view.index'),
@ksaio
ksaio / wsgi.py
Created March 16, 2013 21:38
django-uwsgi-testing-autoreload
# Try to load uwsgi modules
# For testing uwsgi with django
try:
import uwsgi
from uwsgidecorators import timer
from django.utils import autoreload
@timer(1)
def change_code_gracefull_reload(sig):
# defaults file for spideroak daemon headless mode
# SpiderOak does not currently support handling the initial setup of
# an account, or setup of a new device within an account entirely from
# the command line. This is because the new user setup process requires
# the user to answer a CAPTCHA and some other validation processes.
#
# Instead, we recommend connecting to the headless server using "ssh -X"
# to forward X11 connections back to your local desktop machine with X11
# running. Within your ssh session to the headless server, run SpiderOak