Skip to content

Instantly share code, notes, and snippets.

View Joshfindit's full-sized avatar

Josh Joshfindit

View GitHub Profile
@ntrepid8
ntrepid8 / autossh-jump-rtunnel.service
Last active October 7, 2020 01:45
AutoSSH reverse tunnel service config for systemd
[Unit]
Description=AutoSSH reverse tunnel service for jump.you.io 100022 -> 22
After=network.target
[Service]
Environment="AUTOSSH_GATETIME=0"
ExecStart=/usr/bin/autossh -M 0 -o "ExitOnForwardFailure=yes" -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -NR 10022:127.0.0.1:22 [email protected] -i /home/root/.ssh/id_rsa
[Install]
WantedBy=multi-user.target
@ProGM
ProGM / debug.rb
Created October 12, 2016 10:36
Debugging neo4j.rb
Neo4j::ActiveBase.current_session.adaptor.logger.level = Logger::DEBUG
Neo4j::Core::CypherSession::Adaptors::Base.subscribe_to_query(&method(:puts))
Neo4j::Core::CypherSession::Adaptors::HTTP.subscribe_to_request(&method(:puts))
Neo4j::Core::CypherSession::Adaptors::Embedded.subscribe_to_transaction(&method(:puts))
@super3
super3 / payout.MD
Last active September 8, 2020 01:48
Storj Bridge Payout Formula

Payout Formula

paymentModelFunction = function(gbHours, telemReports, downloadedBytes) {
 gbHoursScaled =  (gbHours - mean(gbHours)) / sd(gbHours)
 telemReportsScaled =  (telemReports - mean(telemReports)) / sd(telemReports)
 downloadedBytesScaled = (downloadedBytes - mean(downloadedBytes)) / sd(downloadedBytes)
 
 basePayout = 10
 ghHourPayout = 12.2221 * gbHoursScaled
 telemReportsPayout = 0.1452 * telemReportsScaled
In the directory your configuration.yaml file is location, create a folder called custom_components and put group_globber.py there. Then inside your configuration.yaml file, add a section like so:
group_globber:
groups:
group.group_emby:
- media_player.emby*
You should probably already have the group, in this case "group_emby" already created somewhere. Then you can add a list of wildcards that'll match entities and put them in that group.
Note: I have not tried modifying the built in "all" groups and I have always had the group I want to add things to already created.
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much