Skip to content

Instantly share code, notes, and snippets.

View davidenko87's full-sized avatar

David Bosveld davidenko87

  • Amsterdam
View GitHub Profile
class SpotifyConnection
BASE_URI = 'https://api.spotify.com/v1'.freeze
def initialize(user)
@user = user
end
def user_information
connection('https://api.spotify.com/v1/me')
end
@davidenko87
davidenko87 / wetransfer_uploader.rb
Last active February 19, 2019 10:03
A simple uploader to create wetransfer links from the CLI
require 'we_transfer_client'
# gem install wetransfer
# run: ruby wetransfer_uploader.rb /path/to/the/file/you/want/to/share.wav /and/another/file/you/want/to/share.wav
WT_API_KEY=''
client = WeTransfer::Client.new(api_key: WT_API_KEY)
transfer = client.create_board_and_upload_items(name: "WeTransfer CLI Uploader", description: "") do |upload|
ARGV.each do |file|
upload.add_file_at(path: file)
@davidenko87
davidenko87 / funda_wetransfer_script.rb
Last active June 29, 2018 09:54
This Gist will let you scrape the Funda RSS feed into a wetransfer file so you can share it with anyone
require 'open-uri'
require 'we_transfer_client'
require 'simple-rss'
require 'active_support/core_ext/numeric/time'
### To be able to run this script you need the install these gems
### gem install open-uri
### gem install wetransfer
### gem install simple-rss
### and default if you use rails you should have active_support, otherwise install it manually