Skip to content

Instantly share code, notes, and snippets.

View cbuck's full-sized avatar

Chris Buckland cbuck

View GitHub Profile
@cbuck
cbuck / DownloadStationAPI.py
Created April 29, 2017 14:49 — forked from harperreed/DownloadStationAPI.py
example script to sync/download/etc put.io downloads to your synology download station
import time
import requests
import json
class DownloadStationAPI():
def __init__(self, host=None, username=None, password=None):
self.name = 'DownloadStation'
@cbuck
cbuck / buddies.applescript
Last active November 29, 2016 07:54
Get buddies list from MESSAGES app
set newline to ASCII character 10
set availableFormat to "\\033[0;37m"
set awayFormat to "\\033[0;30m"
set idleFormat to "\\033[0;30m"
set offlineFormat to "\\033[0;30m"
set unknownFormat to "\\033[0;30m"
set resetFormat to "\\033[0;30m"
set ownName to "****YOURNAME****"
A0kxKAAlUUX6RFTRKCSlU0iKV6KqZhG5paraJaoow0TqGIWWQfIMRU0TlWtEZRuSfEORcRR0jqhqnajCQVRpoSo9RMJEJNVFSm0U5SOqGIlEJyG1kqiCmUS5icJOFf1ENFTEUgQ9JU0FropkK1GlvhJVclZUEdaKKqK3okp3RVX2Sn8pMBiiw0qLUXpMyWSELgubKfqsUqNROa2wmqhCr1UVsxXdVmE34TdouKocF1VUy6GeIzWd6jqq2q6S7wiMV4Xzqmi9qtJ+CNdYUCWuL7uYLqgu9mGu5QXVEMvOKFuvxuMLPEJYUVDlYtyc9zTKl1/lBjHQggIe7HrfKjeIgRbyDm5YM/pWCQbRuZ5y9SoHBcQF1RDLzihbr1ctPsYhHPAd4rGzJ6pKzyiosnP8/i4mFlQx/4B8OuAVuG+9muf8oJ0uqF6DHuyYw58F1RDLzuhbr1ePIcaxX0F1CNpXWFFQDbHsjL716rHfsKCgC6rDguKAfDrgFbhvdVhQ0OM3eqLk6vUqXww38R5BF1T5YnhB9Zv7DFxQteDBrg8LFlQ9Hs7HUeWV2YSgSo/f6Ilirj6hadLhPVHpehUH7UEsqD6gadLhPY3MclWPh/NxVFXeKXT1CU2TDu/5R6Xr9eq32J8FVWiac4goqIZYdkbfKj1+oyeKql6v16t4B/FY/BOYLqhegx7smMOfVfSZ8BKCPFFl1/ohYvj1rdLfWkPcPY31KnF9PR5OF1RnmG5x6wVVAVmIiYHpvvUqHjfnFrdeUBWQhZgYmO5br34rYhoLqiGWnUHsWyUYROd6MsvPVR2voL/FIbxvvV7FO4jHir0DF1QxnEH3rVf5g+W7Q0EXVEMsO6NvvV5l96YLqhbkC8+gcB2/0dOIqlqQLzyDwqsU3B7f3iIQSGofFCA/NdXhccjiiplB4Tp+o6cRVR0ehyyumBkUXqXg9vj2FoFAUvugAPmpqVe5QQzAd4jHzr5V4tIcCxcT6YLqh6EZND2goAuqIZadkWBoBk0PKOiy9arD
@cbuck
cbuck / robocop.bat
Created November 9, 2015 19:32
robocop with log
robocopy E:\SOURCE /e C:\DESTINATION /MIR /NP /LOG:transfert.txt
@cbuck
cbuck / rdio_artwork.applescript
Last active October 7, 2015 04:37
get current album art from playing track from Rdio app.
set RdioArtworkFolder to ((path to home folder) as text) & "Pictures:Rdio:" as alias
set ArtworkFromRdio to ((path to home folder) as text) & "Pictures:Rdio:FromRdio:albumArt.tiff" as alias
set RdioArtwork to ((path to home folder) as text) & "Pictures:Rdio Artwork:FromRdio:albumArt.tiff"
set RdioBackground to ((path to home folder) as text) & "Pictures:Rdio Artwork:FromRdio:black_background.png"
set DefaultArtwork to ((path to home folder) as text) & "Pictures:RdioArtwork:Default:albumArt.tiff"
set DefaultBackground to ((path to home folder) as text) & "Pictures:Rdio:Default:transparent_background.png"
set displayArtwork to ((path to home folder) as text) & "Pictures:Rdio:albumArt.tiff"
set displayBackground to ((path to home folder) as text) & "Pictures:Rdio:background.png"
set FromRdioFolder to ((path to home folder) as text) & "Pictures:Rdio:FromRdio:"
set ArtworkFromRdio to FromRdioFolder & "albumArt.tiff" as alias
@cbuck
cbuck / rdio_song.applescript
Last active October 7, 2015 04:28
Get current song from Rdio app
on ApplicationIsRunning(appName)
tell application "System Events" to set appNameIsRunning to (name of processes) contains "Rdio"
return appNameIsRunning
end ApplicationIsRunning
on np()
if ApplicationIsRunning("Rdio") then
tell application "Rdio"
set track_name to get name of current track
set artist_name to get artist of current track
@cbuck
cbuck / rdio_artist.applescript
Last active October 7, 2015 04:28
Get current artist from Rdio app
on ApplicationIsRunning(appName)
tell application "System Events" to set appNameIsRunning to (name of processes) contains "Rdio"
return appNameIsRunning
end ApplicationIsRunning
on np()
if ApplicationIsRunning("Rdio") then
tell application "Rdio"
set artist_name to get artist of current track
end tell
tell front window of application "Safari"
make new tab with properties {URL:"http://poseidon"}
end tell
tell application "Google Chrome"
try
if (count of (every window where visible is true)) is greater than 0 then
tell front window
make new tab
end tell
@cbuck
cbuck / Growl.applescript
Created June 13, 2012 14:59 — forked from mceachen/Growl.applescript
iChat and Messages applescript integration: place in ~/Library/Scripts/Messages
using terms from application "iChat"
on message received message from theBuddy for textChat
set whoDidIt to full name of theBuddy
set who to "iChat: " & whoDidIt
set buddyIcon to image of theBuddy
tell application "System Events"
set frontApp to name of first application process whose frontmost is true
end tell
tell application frontApp
set window_name to name of front window
@cbuck
cbuck / AVTime NTP.ini
Last active October 5, 2015 15:38
AVTime master NTP
[AvTime]
Protected=FALSE
Lana=0
ShutDownDialog=False
Mode=Master
SyncedState=Hide
UnsyncedState=Hide
WindowState=1
ReferenceName=nist.gov
ReferenceSource=NTP