Skip to content

Instantly share code, notes, and snippets.

View dualcyclone's full-sized avatar

Luke Dyson dualcyclone

View GitHub Profile
@duncansmart
duncansmart / Get-Powerwall-Data.ps1
Last active May 29, 2025 03:01
Powershell script to download Tesla Powerwall data to a CSV file
###############################################################################
# Get a refresh token using something like https://chrome.google.com/webstore/detail/tesla-access-token-genera/kokkedfblmfbngojkeaepekpidghjgag
$REFRESH_TOKEN = 'your.token.here'
# Set as appropriate:
$startDate = [DateTime]::Parse('2023-04-01')
$csvFile = 'C:\temp\my powerwall data.csv'
###############################################################################
# Auth
$token = Invoke-RestMethod -Uri "https://auth.tesla.com/oauth2/v3/token" -Method Post -Body @{
@anshuraj
anshuraj / gitautocomplete.md
Last active October 7, 2022 11:45
git autocomplete

Download the git-completion.sh file from GitHub:

curl https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash -o ~/.git-completion.bash

Next, add the following to your ~/.bash_profile file:

if [ -f ~/.git-completion.bash ]; then
 . ~/.git-completion.bash
@caniszczyk
caniszczyk / clone-all-twitter-github-repos.sh
Created October 9, 2012 04:25
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@mayoff
mayoff / gist:1138816
Last active December 8, 2023 22:00
AppleScript to make Google Chrome open/reload a URL
(* To the extent possible under law, Rob Mayoff has waived all copyright and related or neighboring rights to “AppleScript to make Google Chrome open/reload a URL”. This work is published from: United States. https://creativecommons.org/publicdomain/zero/1.0/ *)
tell application "Google Chrome"
activate
set theUrl to "http://tycho.usno.navy.mil/cgi-bin/timer.pl"
if (count every window) = 0 then
make new window
end if
set found to false