Skip to content

Instantly share code, notes, and snippets.

View iamhunter's full-sized avatar

Andrew Hunter iamhunter

View GitHub Profile
@iamhunter
iamhunter / spotify_refresh.js
Created June 15, 2017 14:31
Spotify setup part 2
// The code that's returned as a query parameter to the redirect URI
var code = '';
// Retrieve an access token and a refresh token
spotifyApi.authorizationCodeGrant(code)
.then(function(data) {
console.log('The token expires in ' + data.body['expires_in']);
console.log('The access token is ' + data.body['access_token']);
console.log('The refresh token is ' + data.body['refresh_token']);
var SpotifyWebApi = require('spotify-web-api-node');
var scopes = ['user-read-private', 'user-read-email', 'playlist-modify-public'],
redirectUri = '',
clientId = '',
state = '';
var spotifyApi = new SpotifyWebApi({
clientId : '',
clientSecret : '',
@iamhunter
iamhunter / trail.s
Created December 15, 2016 04:26
IEEE
.text
.global trailing_zeros
.type trailing_zeros, %function
word .req r0
zero .req r1
temp .req r2
count .req r3
countdown .req r4
@Takes in 3 parameters, (A,B,C) and returns the result of
@(A + (B * C))
.text
.global mac
.type mac, %function
aye .req r0
bee .req r1
cee .req r2
@Description reads in three parameters, runs a subroutine
@and prints the results of the subroutine
.text
.global main
.type main, %function
aye .req r1
bee .req r2
cee .req r3
@iamhunter
iamhunter / 000-default.conf
Created October 24, 2016 16:49
Virtual Host example for SSL with cloudflare
<VirtualHost Local.IP.Address:443>
DocumentRoot /var/www/html
ServerName www.example.com
SSLEngine on
SSLCertificateFile /var/www/html/ssl/cert.crt
SSLCertificateKeyFile /var/www/html/ssl/key.key
<Directory "/var/www/html">
AllowOverride All
</Directory>
@iamhunter
iamhunter / ddclient.conf
Created October 24, 2016 16:45
DDClient configuration for CloudFlare DDNS
##
## Cloudflare (cloudflare.com)
##
daemon=1800
use=web, web=ipinfo.io/ip, web-skip='IP Address'
ssl=yes
protocol=cloudflare, \
server=www.cloudflare.com, \
login=*cloudflare-email* \
password=*cloudflare-global-api-key* \