Skip to content

Instantly share code, notes, and snippets.

View brookslyrette's full-sized avatar
🏠
Working from home from now until forever.

Brooks Lyrette brookslyrette

🏠
Working from home from now until forever.
View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Theme Template for Bootstrap</title>
<!-- Bootstrap core CSS -->
//import bootstrap
@import "../../../node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
//set our customizations
//I'll use the Dotsub colors
$dotsubBlue: #0b506f;
$dotsubBlueHighlight: #336880;
$dotsubMainBlue: #2281aa;
$white: #fff;
//custom links
$linkColor: $dotsubBlueHighlight;
@brookslyrette
brookslyrette / .eslintrc
Created December 3, 2015 21:36
Dotsub's eslint configuration
{
"extends": "airbnb",
"ecmaFeatures": {
"modules": true
},
"rules": {
"react/no-multi-comp": 0,
"indent": [2, 4],
// no hanging comma's
"comma-dangle": [2, "never"],
language: java
jdk:
- oraclejdk8
#!/bin/bash
if ls **/test-results/*.xml 1> /dev/null 2>&1; then
curl -H "Authorization: token <your_githib_api_token>" --request POST --data '{"state": "success", "context": "travis-ci/build", "description": "Build Passed"}' https://api.github.com/repos/dotsub/vtms/statuses/${TRAVIS_COMMIT} > /dev/null
else
curl -H "Authorization: token <your_githib_api_token>" --request POST --data '{"state": "failure", "context": "travis-ci/build", "description": "Build Failed!"}' https://api.github.com/repos/dotsub/vtms/statuses/${TRAVIS_COMMIT} > /dev/null
fi
##check for test failures.
if (grep 'failure message' **/test-results/*.xml 1> /dev/null 2>&1) then
mainJunit=$(find **/test-results/*.xml -print0 | xargs -0 grep 'failure message' | wc -l)
curl -H "Authorization: token <your_githib_api_token>" --request POST --data '{"state": "failure", "context": "travis-ci/tests", "description": "'"${mainJunit}"' Test(s) failed!"}' https://api.github.com/repos/dotsub/vtms/statuses/${TRAVIS_COMMIT} > /dev/null
language: java
jdk:
- oraclejdk8
after_success:
- ./src/main/scripts/post-build.sh
$(document).ready(function() {
recognition.continuous = true;
recognition.interimResults = true;
recognition.onresult = speechRecognition;
});
//speech recognition
var speechRecognition = function(event) {
var interimTranscript = '';
//google translate from source to target language
var callbackCount = 0;
var google = {
key: <google_translate_api_key_goes_here>,
endpoint: "https://www.googleapis.com/language/translate/v2",
language: {
ContentType: {TEXT: "text"},
translate: function(options, sourceCode, targetCode, callback) {
var callbackName = "callback" + callbackCount;
var localCallbackWrapper = function(resp) {
//voices are loaded async
window.speechSynthesis.onvoiceschanged = function() {
for (var i = 0; i < window.speechSynthesis.getVoices().length; i++ ) {
//only non English voices should be added
var voice = window.speechSynthesis.getVoices()[i];
if (!voice.lang.startsWith('en')) {
//create option tag
var name = voice.name + " (" + voice.lang + ")";
$('.languageSpoken').append($('<option>', {value: i, text: name}));
}