This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const AWS = require('aws-sdk') | |
const s3 = new AWS.S3({ | |
accessKeyId: process.env.AWS_KEY, | |
secretAccessKey: process.env.AWS_SECRET, | |
useAccelerateEndpoint: true | |
}) | |
const getSignedUrlPromise = (operation, params) => { | |
return new Promise((resolve, reject) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<canvas ref="canvas"></canvas> | |
</template> | |
<script> | |
export default{ | |
methods: { | |
generateNoise() { | |
this.noise = document.createElement('canvas') | |
this.noise.height = window.innerHeight * 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios') | |
let CLIENT_ID="YOUR_CLIENT_ID" | |
let CLIENT_SECRET="YOUR_CLIENT_SECRET" | |
let auth = Buffer.from(`${CLIENT_ID}:${CLIENT_SECRET}`).toString('base64') | |
axios({ | |
method: 'post', | |
url: 'https://accounts.spotify.com/api/token', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// initialize axios instance | |
let apple = axios.create({ | |
baseURL: 'https://api.music.apple.com/v1', | |
headers: { | |
'Authorization': `Bearer ${developerToken}`, | |
'Music-User-Token': `${musicUserToken}` | |
} | |
}) | |
// create playlist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// initialize axios instance | |
let spotify = axios.create({ | |
baseURL: 'https://api.spotify.com', | |
headers: { | |
'Authorization': `Bearer ${token}` | |
} | |
}) | |
// get user id for playlist creation | |
spotify.get('/v1/me').then(res => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<ul> | |
<li v-for="color in colors" :style="{ background: `rgb(${color[0]},${color[1]},${color[2]})`}" @click="selectColor(color)"></li> | |
</ul> | |
</template> | |
<script> | |
export default{ | |
props: ['colors'], | |
methods: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// node instagram-dl.js BnmcJ-tnAey | |
const rest = require('restler') | |
const fs = require('fs') | |
const request = require('request') | |
rest.get(`https://www.instagram.com/p/${process.argv.slice(2)[0]}/?__a=1`).on('complete', function(data) { | |
var videoUrl = data.graphql.shortcode_media.video_url | |
var videoFilename = videoUrl.split("/")[videoUrl.split("/").length - 1] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const app = new Vue({ | |
el: '#app', | |
data() { | |
return { | |
figmaToken: '', | |
baseUrl: 'https://api.figma.com/v1', | |
fileId: '', | |
nodeId: '', | |
images: null, | |
nodes: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$white: #FFFFFF | |
$grey: #CCC | |
$logo: 75px | |
#logo | |
height: $logo | |
width: $logo * 2 | |
&:before, &:after | |
border-style: solid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ -> | |
# Variables | |
photo = 0 | |
size = 150 | |
directions = | |
center: { x: size, y: size, i: "straight ahead" } | |
north: { x: size, y: 0, i: "up" } | |
northwest: { x: 0, y: 0, i: "up over your right shoulder" } | |
west: { x: 0, y: size, i: "right" } | |
southwest: { x: 0, y: size * 2, i: "at your right shoulder" } |