Skip to content

Instantly share code, notes, and snippets.

mklink /d D:\TEMP\Spotify C:\Users\<username>\AppData\Local\Spotify
#------------------------------------------------------------------------------
# THIS CODE AND ANY ASSOCIATED INFORMATION ARE PROVIDED “AS IS” WITHOUT
# WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT
# LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS
# FOR A PARTICULAR PURPOSE. THE ENTIRE RISK OF USE, INABILITY TO USE, OR
# RESULTS FROM THE USE OF THIS CODE REMAINS WITH THE USER.
#------------------------------------------------------------------------------
$global:access_token = $null
$global:refresh_token = $null
#Netatmo Details. Client ID and secret from creating the App, and a username and password that has access to the api.
function Netatmo-DoAuth {
$postParams = @{
grant_type='password';
client_id=$client_id;
client_secret=$client_secret;
username=$Netatmo_username;
password=$Netatmo_password
}
$Request = Invoke-WebRequest -Uri https://api.netatmo.com/oauth2/token -Method POST -Body $postParams -UseBasicParsing
$uri = 'https://api.netatmo.com/oauth2/token'
$body = @{
"client_id" = "ClientID";
"client_secret" = "ClientSecret";
"grant_type" = "password";
"username" = "Mail";
"password" = "Password"
}
$uri = 'https://api.netatmo.com/oauth2/token'
@EinPinsel
EinPinsel / zshrc
Last active September 14, 2022 19:56
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
# Theme
ZSH_THEME="pygmalion"
# Uncomment the following line to use case-sensitive completion.
CASE_SENSITIVE="true"
# Uncomment the following line to use hyphen-insensitive completion. Case
@EinPinsel
EinPinsel / howto.sh
Created October 21, 2016 21:13 — forked from Maddosaurus/howto.sh
Create OPenVPN cert
# become root
sudo su -
# change dir to easy rsa
cd /etc/openvpn/easy-rsa
# source the environment vars
source ./vars
# create a new cert