Skip to content

Instantly share code, notes, and snippets.

View Pe8er's full-sized avatar
🤡
Calzone will not be tolerated

Piotr Gajos Pe8er

🤡
Calzone will not be tolerated
View GitHub Profile
global aname, tname, alname, stardisplay, rate
property blackStar : «data utxt2605» as Unicode text
property whiteStar : «data utxt2606» as Unicode text
set musicapp to my appCheck()
try
if musicapp is not false then
if musicapp is "iTunes" then
tell application "iTunes"

Keybase proof

I hereby claim:

  • I am Pe8er on github.
  • I am pe8er (https://keybase.io/pe8er) on keybase.
  • I have a public key whose fingerprint is A2B1 5A65 788F C41F D060 C599 BFEB 3560 64A8 8BA4

To claim this, I am signing this object:

// GAMEPLAY
set g_speed "666"
// KEYBOARD
bind w "+forward"
bind s "+back"
IP6: fe80::ecd8:8dff:feb1:703f%awdl0
IP6: fe80::9e41:1a5:84e3:7c96%utun0
IP6: fe80::a299:9bff:fe09:18c3%ipsec0
IP6: 2607:fb90:5c0:1ec6:f41f:e13f:4d6f:d2d0
IP6: fe80::2a39:cdcc:c2d1:b4db%utun1
Opening IP6 socket: [::]:27960
Opening IP socket: 0.0.0.0:27960
tty console mode disabled
]/condump
usage: condump <filename>
on run (argv)
--use this to debug. Options: myPortfolio, btc, ltc
if class of argv is script then set argv to {"myPortfolio"}
set myInvestment to 1528.73 --how much USD you invested
set myBTC to 0.0758 --how much BTC you have
set myETH to 1.7872 --how much ETH you have
set myLTC to 4.9431 --how much LTC you have
global jsonWeek, jsonYear, jsonAthlete, athleteID
property token : "????" -- your Strava API access token. Get it here: https://www.strava.com/settings/api
property yearRideGoal : 2000 -- in kilometers
property enableLogging : "off" --- options: on | off
on run theArgument
-- Set up the JSON files
tell application "Finder"
if application "iTunes" is running then
tell application "iTunes" to set {tArtist, tName, tAlbum, isLoved} to {artist, name, album, loved} of current track
if isLoved is true then
set isLoved to "★" & space
else
set isLoved to "☆" & space
end if
return isLoved & tArtist & space & "-" & space & tName
else
return ""
set localComputer to "" -- enter name of a remote computer
set username to "" -- remote computer username
set computerPassword to "" -- remote computer password
set remoteComputer to "eppc://" & username & ":" & computerPassword & "@" & localComputer
set rTunes to application "iTunes" of machine remoteComputer
if application "iTunes" is running then
try
tell application "iTunes"
set {tArtist, tName, tAlbum, theID} to {artist, name, album, database ID} of current track
set nextEvent to do shell script "~/.dotfiles/bin/icalBuddy -ec 'Found in Natural Language' -npn -nc -iep 'title,datetime,location' -eed -ea -n -li 1 -ps '| @& |' -b '' eventsToday"
log nextEvent
if nextEvent is not "" then
set AppleScript's text item delimiters to " @& "
set itemCount to count of text items of nextEvent
--log itemCount
if itemCount is 1 then
set APIKey to "????" -- your secret Dark Sky API key. Get it here: https://darksky.net/dev/account
tell application "JSON Helper"
try
set latLon to do shell script "/usr/local/bin/locateme -f '{LAT},{LON}'"
set weather to fetch JSON from "https://api.darksky.net/forecast/" & APIKey & "/" & latLon & "?exclude=minutely,hourly,daily,alerts,flags&units=si"
on error e
return e
end try