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
body { | |
background: #db0000; | |
} |
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
/** | |
* The width and height to which our graphic assets are designed for | |
* Keep in mind retina resolutions and remember to provide 2xWidth 2xHeight assets for them | |
*/ | |
var targetWidth = 1024; | |
var targetHeight = 768; | |
/** | |
* The main (root) container on the stage | |
* You should always have a master container on your stage |
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
syntax = "proto3"; | |
package audio_node; | |
service AudioNode { | |
// 1 connection with all audio channels | |
rpc StartAudioIngestion (CallId) returns (Empty); | |
rpc IngestAudio (stream AudioChunk) returns (Empty); | |
rpc FinishAudioIngestion (CallId) returns (Empty); |
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
function flatten(arr) { | |
if (Array.flat) { // because we're all excited that this is finally making production! | |
return arr.flat(Infinity); | |
} | |
if (!arr.some(item => Array.isArray(item))) { | |
return arr; | |
} | |
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
#include <thread> | |
#include <future> | |
#include <chrono> | |
#include <iostream> | |
#include <vector> | |
double runMeAsync(int n) { | |
n *= 10000000; | |
for (unsigned i = 0; i < 100000000; i++) { | |
n++; |
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
function fixIframe() { | |
// get the images | |
var images = $("img[src*=imgur]"); | |
images.each(function(i, image) { | |
var $image = $(image), | |
iframe, | |
content; | |
// wrap each image into an iframe that pretends we load the images from our local computer |
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
/*global _li*/ | |
(function (module) { | |
'use strict'; | |
var moduleName = module.get('name'), | |
init; | |
init = function () { | |
module.publish(moduleName + '.events'); // fire other exposed module |
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
git submodule foreach -q --recursive 'branch="$(git config -f $toplevel/.gitmodules submodule.$name.branch)" && git checkout $branch' |
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
//convert | |
for i in *.wav; do lame -b 320 -h "${i}" "${i}.mp3"; done | |
//remove the .wav part | |
for f in *.mp3; do mv "$f" "${f/.*./.}"; done |
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
// Cleaning up pixi sprite reference arrays | |
// Don't | |
var elements = []; | |
function() { | |
elements.forEach(function (element) { | |
element.parent.removeChild(element); | |
element = null; | |
}); |
NewerOlder