I hereby claim:
- I am MatthewStanciu on github.
- I am matthewstanciu (https://keybase.io/matthewstanciu) on keybase.
- I have a public key whose fingerprint is A7A8 5FA9 5A1F A011 113D 4D16 3323 6044 6161 01D3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var express = require('express'); | |
var app = express(); | |
var http = require('http').Server(app); | |
var bodyParser = require('body-parser'); | |
var request = require('request'); | |
var refresh = require('spotify-refresh'); | |
require('dotenv').config(); | |
var redirect_uri = 'http://localhost:3000/callback' |
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="./public/style.css"> | |
</head> | |
<body> | |
<h1><a href="link-to-playlist" target="_blank"> | |
Your song has been added to the playlist!</a></h1> | |
</body> | |
</html> |
app.post('/song', function(req, res) { | |
refresh(process.env.REFRESH_TOKEN, process.env.CLIENT_ID, process.env.CLIENT_SECRET, function(err, res, body) { | |
if (err) return err; | |
request.post({ | |
url: 'https://api.spotify.com/v1/playlists/your-playlist-id/tracks?uris=spotify%3Atrack%3A' + | |
getIDfromUrl(req.body.submiturl), | |
headers: { | |
'Authorization': 'Bearer ' + body.access_token, | |
'Host': 'api.spotify.com', | |
'Accept': 'application/json', |
function getIDfromUrl(url) { | |
var split1 = url.split('/'); | |
var split2 = split1[4].split('?'); | |
return split2[0]; | |
} |
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="./public/style.css"> | |
</head> | |
<body> | |
<form action="/song" method="post" id="urlform"> | |
<input class="url" name="submiturl" type="text" placeholder="Enter the Spotify URL" autofocus> | |
</form> | |
<button form="urlform"><strong>Add to playlist</strong></button> |
var express = require('express'); | |
var app = express(); | |
var http = require('http').Server(app); | |
var bodyParser = require('body-parser'); | |
var request = require('request'); | |
var querystring = require('querystring'); | |
var accessToken = ''; | |
var refreshToken = ''; | |
var trackUri = ''; |
pragma solidity ^0.4.23; | |
contract TheWritersBlock { | |
address public owner; | |
mapping (address => uint256) public balance; | |
constructor() public { | |
owner = msg.sender; | |
} |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script> | |
<script src="./index.js"></script> | |
</head> | |
<body> | |
<div id="pay"> | |
<form> |
Verifying my Blockstack ID is secured with the address 19v2oMcDL7CMCajc8swZdCTsvK5xQfZDTd https://explorer.blockstack.org/address/19v2oMcDL7CMCajc8swZdCTsvK5xQfZDTd |