Skip to content

Instantly share code, notes, and snippets.

View sytone's full-sized avatar
🎯
Focusing

Sytone sytone

🎯
Focusing
View GitHub Profile
```dataviewjs
this.container.style.minHeight = "1000px";
const { renderCalendar } = app.plugins.plugins["obsidian-full-calendar"];
let today = moment().format("GGGG-[W]WW");
let rawData = await dv.io.csv("DataStores/csv/" + moment().format("GGGG-[W]WW") + ".csv");
let entries = rawData.map((p) => ({
backgroundColor: p.calendar == 'family' ? '#452538' : '#4d95f7',
borderColor: this.app.vault.getAbstractFileByPath(p.id + ".md") ? '#406f0b' : '#4d95f7',
allDay: p.allDay,
@sytone
sytone / index.pug
Created February 26, 2021 17:17
yLVvKwy
.container

Keybase proof

I hereby claim:

  • I am sytone on github.
  • I am sytone (https://keybase.io/sytone) on keybase.
  • I have a public key ASCIDi-ZVIyiLAbWJISH2I1qiReta-GqPkbHpWxv7gph2wo

To claim this, I am signing this object:

$toolingRoot = "c:\idt"
$runLog = "$toolingRoot\run.log"
if(-not (Test-Path $toolingRoot)) {
New-Item -Path $toolingRoot -ItemType Directory -Force -ErrorAction SilentlyContinue
}
"Running as $($Env:USERNAME) at $(Get-Date)" | Set-Content -Path $runLog
function log($message) {
$message | Add-Content -Path $runLog
@sytone
sytone / .gitconfig
Last active January 10, 2024 16:57
Aliases I have in my global git config
[alias]
# Pull with prune
pp = pull --prune --autostash
# Standard checkout
co = checkout
# Edit the global configuration
ec = config --global -e
@sytone
sytone / Get-AdUserAllDomains.ps1
Created September 24, 2018 18:10
Get user in AD from all domains in the forest
param (
$Filter
)
$arrayOfFQDNs = ([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() | select domains).Domains | select Name | % { $_.Name }
foreach ($FQDN in $arrayOfFQDNs) {
$adUser = get-aduser -Filter $Filter -properties * -server $FQDN -ErrorAction SilentlyContinue
if ($adUser -ne $null) {
break
@sytone
sytone / FillCalendarForPeriod.ps1
Last active September 13, 2018 17:21
Fill empty blocks in your outlook calendar for the next week
param (
[int] $DaysForward = 7,
# What hour of the day do you start?
[int] $DayStart = 8,
# How many hours after that are work hours?
[int] $DayLength = 10
)
function Get-OutlookCalendar {
param (
@sytone
sytone / HomeAssistantWinDev.md
Last active November 6, 2016 02:24
Developing Home Asisstant in Windows on the Windows Subsystem for Linux

Setup

Enable the Windows feature for the subsystem. Either do this via Add Remove Programs or open a PowerShell instance as a Administrator.

Run the following command to see if it is already enabled:

Get-WindowsOptionalFeature -online -FeatureName Microsoft-Windows-Subsystem-Linux

If it is not enabled then run the following to enable and reboot your computer.

@sytone
sytone / updatehs.sh
Last active May 2, 2018 08:46
Home Assistant Updater Script
#!/bin/bash
## DESCRIPTION: Updates HA in a virtual environment
## AUTHOR: Jon Bullen
declare -r SCRIPT_NAME=$(basename "$BASH_SOURCE" .sh)
## exit the shell(default status code: 1) after printing the message to stderr
bail() {
echo -ne "$1" >&2
@sytone
sytone / BackfillEmbyFromNPvr.ps1
Last active July 30, 2016 01:54
Used to schedule recordings in Next PVR to fill missing items in EMBY.
<#
Set these values and uncomment.
$embyServerUrl = "http://localhost:8096"
$embyUsername = "user"
$embyPassword = "password"
$npvrServerUrl = "http://localhost:8866"
#>