- All Channels have a one to one mapping with the entry in the credentialStore.
- The refreshing process is managed by the GoogleAuthorizationFlow api client.
This file contains hidden or 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 analytics.api; | |
| import com.googlecode.concurrentlinkedhashmap.ConcurrentLinkedHashMap; | |
| import org.eclipse.jetty.continuation.Continuation; | |
| import org.eclipse.jetty.continuation.ContinuationSupport; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import javax.servlet.*; | |
| import javax.servlet.http.HttpServletRequest; |
This file contains hidden or 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
| #!/bin/bash | |
| JDK_FILE="jdk-8u20-linux-x64.tar.gz" | |
| JDK_URL="https://s3.amazonaws.com/com.brightcove.rna.repo.dev/${JDK_FILE}" | |
| JDK_ARCHIVE="${HOME}/${JDK_FILE}" | |
| JDKS_DIR="${HOME}/jdks" | |
| JDK_DIR="${JDKS_DIR}/jdk1.8.0_20" | |
| # ensure jdks directory exists | |
| mkdir -p $JDKS_DIR |
This file contains hidden or 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 knife_dl() { | |
| local packages="$@" | |
| cd ~/chef/cookbooks | |
| for c in ${packages}; do | |
| knife cookbook site download ${c}; | |
| tar zxf ${c}*.tar.gz; | |
| rm ${c}-*.tar.gz; | |
| done | |
| } |
This file contains hidden or 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 context = cubism.context(), | |
| cube = context.cube("https://data.brightcove.com/v1/accounts/8523") | |
| cube.metric("video_view") | |
| */ | |
| cubism_contextPrototype.analytics_api = function(url) { | |
| if (!arguments.length) url = ""; | |
| var source = {}, | |
| context = this; |
This file contains hidden or 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
| input { | |
| file { | |
| type => "analytics-api" | |
| path => "/var/log/analytics-api/analytics-api.log" | |
| } | |
| file { | |
| type => "mongos" | |
| path => ["/var/log/mongodb/mongos_rolling.log", "/var/log/mongodb/mongos_historical.log", "/var/log/mongodb/mongos_collector.log"] | |
| } | |
| file { |
This file contains hidden or 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 removeDB(n) { | |
| flushConfigs(); | |
| var colls = findChunkedCollections(n); | |
| colls.forEach(function(coll) { | |
| if(!db.getSisterDB(n).getCollection(coll).exists()) { | |
| print("collection did not exist for chunk: " + n + "." + coll) | |
| getPrimaries().forEach(function(p){ | |
| p.getDB(n).createCollection(coll); | |
| }); |
This file contains hidden or 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
| { | |
| "percent" : 6.297823041677475, | |
| "bytesDone" : NumberLong("22117130240"), | |
| "files" : { | |
| "done" : 8, | |
| "total" : 166 | |
| }, | |
| "current" : { | |
| "source" : "/var/lib/mongodb_historical11/local_oplog_rs_p15_id__ddfdbfc0_1_19.tokumx", | |
| "dest" : "/backup11/local_oplog_rs_p15_id__ddfdbfc0_1_19.tokumx", |
This file contains hidden or 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
| #!/bin/sh | |
| GROOVY_VERSION=${$GROOVY_VERSION:-"2.1.6"} | |
| if [ -z "$@" ]; then | |
| echo "No argument specified" | |
| exit 1 | |
| fi | |
| if [ ! -f "$@" ]; then |
This file contains hidden or 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
| #!/usr/bin/env ruby | |
| def check_require(name) | |
| begin | |
| gem name | |
| rescue Gem::LoadError | |
| # not installed | |
| system("gem install #{name}") | |
| Gem.clear_paths | |
| end | |
| require name |