Skip to content

Instantly share code, notes, and snippets.

View schoenwaldnils's full-sized avatar
🎧

Nils Schönwald schoenwaldnils

🎧
View GitHub Profile
@schoenwaldnils
schoenwaldnils / automations.yml
Created January 30, 2024 19:18
CO2 light home assistant automations
- id: #censored#
alias: Air bad!
description: ''
trigger:
- type: carbon_dioxide
platform: device
device_id: #censored#
entity_id: sensor.qingping_air_monitor_lite_co2_carbon_dioxide
domain: sensor
above: 2000
@schoenwaldnils
schoenwaldnils / updatePlayNow.ps1
Created August 15, 2021 22:12
Powershell script to update latest playing track - Virtual DJ
# Put this file into C:\Users\<USER>\Documents\VirtualDJ\History
#
# To Allow PowerShell-Scripts:
#
# Open Pwershell and run:
# Set-ExecutionPolicy remotesigned
#
# and:
# Unblock-File updatePlayNow.ps1
#
@schoenwaldnils
schoenwaldnils / stream-adb.md
Last active November 24, 2023 16:59
Stream Android device to mac (Quest)

Stream from android device (Oculus Quest)

Initial installs

1. install hombrew

Easyest way would be to install hombrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
@schoenwaldnils
schoenwaldnils / terminal
Created October 31, 2016 22:29
Add gh-pages branch.
git checkout --orphan gh-pages
git rm -rf .
touch README.md
git add README.md
git commit -m "Init gh-pages"
git push --set-upstream origin gh-pages
git checkout master
@schoenwaldnils
schoenwaldnils / auto-deploy.md
Last active October 4, 2016 16:34 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an docs/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

Check this script in to your project.

@schoenwaldnils
schoenwaldnils / custom-taxonomies-tpl
Created July 26, 2016 15:37
Show custom taxonomies in template
<table>
<?php
$taxonomies = array_post_taxonomies(get_the_id());
foreach ($taxonomies as $taxonomie) { ?>
<tr>
<td><?php echo $taxonomie['title']; ?></td>
<td><?php echo $taxonomie['term']; ?></td>
</tr>
<?php
} ?>
@schoenwaldnils
schoenwaldnils / taxonomie_array
Last active July 26, 2016 15:35
Create array for custom taxonomies
function array_post_taxonomies($the_id) {
$content = [];
$args = array( 'public' => true, '_builtin' => false );
$output = 'objects';
$operator = 'and';
$taxonomies = get_taxonomies( $args, $output, $operator );