Skip to content

Instantly share code, notes, and snippets.

View thatkookooguy's full-sized avatar

Neil Kalman thatkookooguy

View GitHub Profile
@thatkookooguy
thatkookooguy / sleep-sort.js
Last active December 12, 2024 22:23 — forked from vstarck/sleep_sort.js
Sleep Sort in JavaScript | http://t.co/nWJACyK
// from: http://dis.4chan.org/read/prog/1295544154/170
function sleepSort(list, callback) {
const result = [];
list.forEach((i) => setTimeout(() => {
result.push(i);
if (result.length == list.length) {
callback(result);
}
curl -X GET \
'https://www.lens.org/lens/patent/US_2018_0112244_A1/sequences/download?si=1' \
-H 'Accept: */*' \
-H 'Cache-Control: no-cache' \
-H 'Connection: keep-alive' \
-H 'Host: www.lens.org' \
-H 'Postman-Token: 28a6176c-d3e0-4ec1-8b1f-e7f3b9fe53db,5eb25f4d-7d60-436c-a083-49c56c7e6eaa' \
-H 'User-Agent: PostmanRuntime/7.15.0' \
-H 'accept-encoding: gzip, deflate' \
-H 'cache-control: no-cache'
@thatkookooguy
thatkookooguy / test.js
Created November 27, 2019 09:29
Nice! didn't know you can do that!
let nice = 'pizza';
let bad = { [ nice ]: 'lazagna' };
console.log(bad);
// { pizza: "lazagna" }
@thatkookooguy
thatkookooguy / getCallLocation.js
Last active January 27, 2020 14:20
get call location of function for tests\logs\etc.
function getCallLocation(stopStackFnName) {
stopStackFnName = stopStackFnName || 'getCallLocation';
function getErrorObject() {
try {
throw new Error('');
} catch (err) {
return err;
}
}
@thatkookooguy
thatkookooguy / osx_bootstrap.sh
Last active February 25, 2020 13:23 — forked from mrichman/osx_bootstrap.sh
Bootstrap script for setting up a new OSX machine
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)
@thatkookooguy
thatkookooguy / chocolatey-env-setup.ps1
Created February 24, 2020 17:42 — forked from amogram/chocolatey-env-setup.ps1
A Chocolatey script for PowerShell I use to set up my Windows development environment. I use this when setting up my own Dev VMs. Use at your own risk.See http://bit.ly/1a301JK and http://chocolatey.org/ for more information.
# Simple environment setup script
# Install Applications
choco install fiddler4
choco install notepadplusplus
choco install visualstudiocode
choco install greenshot
choco install GoogleChrome
choco install putty
choco install ccleaner
@thatkookooguy
thatkookooguy / chocolatey-env-setup.ps1
Created February 24, 2020 17:42 — forked from amogram/chocolatey-env-setup.ps1
A Chocolatey script for PowerShell I use to set up my Windows development environment. I use this when setting up my own Dev VMs. Use at your own risk.See http://bit.ly/1a301JK and http://chocolatey.org/ for more information.
# Simple environment setup script
# Install Applications
choco install fiddler4
choco install notepadplusplus
choco install visualstudiocode
choco install greenshot
choco install GoogleChrome
choco install putty
choco install ccleaner
@thatkookooguy
thatkookooguy / thatkookooguy_osx_bootstrap.sh
Last active June 6, 2021 08:16
thatkookooguy osx bootstrap
#!/usr/bin/env bash
#
# Bootstrap script for setting up a new OSX machine
#
# This should be idempotent so it can be run multiple times.
#
# Some apps don't have a cask and so still need to be installed by hand. These
# include:
#
# - Twitter (app store)

I did something similar for myself. It should work the same for a group of steam friends if the data is the same (which I guess it is if you're using a steam sensor for each one of them).

I'll just say up-front that this is a lot of setup to get this to happen. But it shouldn't! I plan to make this into a custom HACS card since just getting all this data directly from the steam sensor will be much easier with a custom card. I'll keep you posted when that happens, but I hope this will get you what you want in the meanwhile :slight_smile:

My setup shows the following things (see image for reference):

  • my steam entity without a now playing section when I'm not playing a game
  • a "now playing" section once I start playing a game
  • an hassio notification when I start playing a game

Here's how I set it up:

@thatkookooguy
thatkookooguy / import-to.js
Created September 29, 2020 12:04
example of require
const lib = require('./node-module');
const newPizza = new lib.Pizza();
// or
const { Pizza, Lazagna, constant } = require('./node-module');
const newPizza = new Pizza();