Skip to content

Instantly share code, notes, and snippets.

View williamtdr's full-sized avatar
🛴
hi!

William Teder williamtdr

🛴
hi!
View GitHub Profile
@williamtdr
williamtdr / alarm.js
Created December 13, 2017 01:22
Activates a spotify connect device at a given time, and plays a random song from a playlist with gradually increasing volume. Customize as desired :)
const SpotifyWebApi = require('spotify-web-api-node');
const WebApiRequest = require('./node_modules/spotify-web-api-node/src/webapi-request');
const HttpManager = require('./node_modules/spotify-web-api-node/src/http-manager');
const express = require('express');
const bodyParser = require('body-parser');
const open = require('open');
const fs = require('fs');
const moment = require('moment-timezone');
let app = express();
<?php
function convert_number_to_words($number) {
$hyphen = '-';
$conjunction = ' and ';
$separator = ', ';
$negative = 'negative ';
$decimal = ' point ';
$dictionary = array(
0 => 'zero',