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
var videoIdArray = []; | |
var getVideoIds = new Promise( function(resolve, reject) { | |
ypi.playlistInfo("AIzaSyCgvxvDPy5djGfZhuqi34wrTh-c1UBhEzU", /*program.*/playlist, function(playlistItems) { | |
var videoIds = playlistItems.map(function(item) { | |
return item.resourceId.videoId; | |
}); | |
resolve(videoIds); | |
}); |
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
nice |
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
<h1>Hello world!</h1> |
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
<ri-bar> | |
{// contents of ri-bar inside ri-foo?} | |
<script> | |
// contents of ri-bar inside ri-foo? | |
</script> | |
</ri-bar> |
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 items = [{ | |
id: 'foo', | |
index: 0 | |
}, { | |
id: 'bar', | |
index: 1 | |
}, { | |
id: 'lipsum', | |
index: 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
let items = ['foo', 'bar', 'lorem', 'ipsum', 'hello', 'world', 'test', 'random', 'asdf', 'qwerty']; | |
const toBeDeleted = ['lorem', 'hello', 'world']; | |
// Method 1: simple but horribly inefficient | |
items = items.filter(item => !toBeDeleted.includes(item)); | |
// Method 2: decent, but verbose and still slower than Set | |
const map = toBeDeleted.reduce((acc, item) => { | |
acc[item] = true; | |
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
if logger, err := syslog.New(syslog.LOG_ERR, "ara"); err != nil { | |
log.Fatal("Error writing syslog!") | |
} | |
logger.Info("Starting Ara...") |
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
package main | |
import ( | |
"log/syslog" | |
"rpi_ws281x/golang/ws2811" | |
"time" | |
"ara/color" | |
"os" | |
"fmt" | |
) |
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
'use strict'; | |
const webpack = require('webpack'); | |
const path = require('path'); | |
const ExtractText = require('extract-text-webpack-plugin'); | |
const cssnext = require('postcss-cssnext'); | |
const config = { | |
entry: './assets/js/main.js', | |
output: { |
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
'use strict'; | |
const webpack = require('webpack'); | |
const path = require('path'); | |
const ExtractText = require('extract-text-webpack-plugin'); | |
const cssnext = require('postcss-cssnext'); | |
const config = { | |
entry: './assets/js/main.js', | |
output: { |
OlderNewer