Skip to content

Instantly share code, notes, and snippets.

View dasinking's full-sized avatar

Alexander L. dasinking

View GitHub Profile

Keybase proof

I hereby claim:

  • I am dasinking on github.
  • I am dasinking (https://keybase.io/dasinking) on keybase.
  • I have a public key whose fingerprint is FC14 BF1A D2A0 24E2 D0C7 8FD8 1AAA F068 DE6F 6E22

To claim this, I am signing this object:

@dasinking
dasinking / spotifycover.rb
Last active November 30, 2016 22:00
A script for downloading coverarts out of playlists. They need to be extracted into the JSON format, links for that are in the first few lines. (Small note: the script crashes with certain album titles, f.e. when they have a / in them. Just delete them out of the JSON file.)
#spotify_cover_parsing by dasinking
#d2l0aCA8MyB0byBtdXNpYyBhbmQgd2l0aCA8MyB0byBFLg==
#from curl -X GET "https://api.spotify.com/v1/users/dasinking/playlists/3DmjKnSLABNPOFYXy8devx/tracks" -H "Accept: application/json" -H "Authorization: Bearer BQCpuq0SjoyskYthGm3qx0A1umnZP9zqrNw6CJ5bE7cr9CBL4VxFo-9PAXVNKb6Vd0AISRfpZ9cVD8sJqrgDlmq5fvDlsQmLT5c8-sIj9m1BOrjheWIhIPiiidf0eFF_MCNtq41Zi47lzQ"
#command is retrievable via https://developer.spotify.com/web-api/console/get-playlist-tracks/
require 'pp'
require 'json'
require 'open-uri'
@dasinking
dasinking / lvbconvert.rb
Created November 12, 2016 10:50
a small and messy converter for departure times from the LVB to Moovit's format
require 'pp'
require 'clipboard'
require 'ffi'
input = File.read('zeiten.txt')
puts "Zeitenblock eingefügt"
puts ''
puts "Parameter eingeben - 0 für Standard, 1 für alle, jeweilige Buchstaben für Sonderfahrten"
param = gets.chomp
require 'httparty'
require 'twitter'
@CONFIG = YAML.load_file File.expand_path '../config_deezinking.yml', __FILE__
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
@Twitter = Twitter::REST::Client.new do |config|
config.consumer_key = @CONFIG[:twitter_key]
config.consumer_secret = @CONFIG[:twitter_secret]
config.access_token = @CONFIG[:twitter_token]
@dasinking
dasinking / steaminv.rb
Last active November 30, 2016 22:18
a quick and dirty script for notifying us, when we got a drop of a csgo major event
require 'httparty'
require 'json'
require 'pp'
require 'twitter'
@CONFIG = YAML.load_file File.expand_path '../config_deezinking.yml', __FILE__
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE
#Twitter_auth