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
(ns gym.storm.nimbus | |
"Namespace for exercising Nimbus to find out facts about the specific storm | |
cluster. This data can be used to monitor the cluster and look at stats in | |
a way that's got very low load on the overall system." | |
(:require [backtype.storm.clojure :refer :all] | |
[backtype.storm.config :refer :all] | |
[backtype.storm.ui.core :refer :all] | |
[clj-endpoints :as ep] | |
[clj-endpoints.persistence.redis :refer [wcar]] | |
[clj-endpoints.util :as util] |
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
(ns performance.server | |
"The routes for the web server." | |
(:require [cheshire.core :as json] | |
[clj-time.core :refer [now]] | |
[clojure.tools.logging :refer [infof warn warnf error errorf]] | |
[compojure | |
[core :refer [defroutes GET POST]] | |
[handler :as handler]] | |
[ring.middleware.jsonp :refer [wrap-json-with-padding]] | |
[ring.middleware.params :refer [wrap-params]] |
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
dark-magic.main=> (require 'slam :reload-all) | |
nil | |
dark-magic.main=> (slam/unbound 4) | |
nil | |
dark-magic.main=> (slam/bound 4) | |
nil |
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
create or replace function locations_for_demand_set(ds_id uuid) | |
returns table(id uuid, | |
demand_id uuid, | |
is_anchor_zip boolean, | |
latitude double precision, | |
longitude double precision, | |
name varchar, | |
subdivision_rank varchar, | |
type varchar, | |
division_permalink varchar, |
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
<html> | |
<head> | |
<title>Dark Magic Query Tools for Quantum Lead</title> | |
<link href='//fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'> | |
<script type='text/javascript' src='zingchart/resources/jquery.min.js'></script> | |
<script type='text/javascript'> | |
// This is a clever little function I found that does a very simplistic | |
// syntax coloring scheme for JSON. What it really is doing is to classify | |
// all the elements, and then with CSS we can color them. Very slick. | |
function syntaxHighlight(json) { |
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 | |
# | |
# This script clears out all the "stale" jars that we no longer need. | |
# They have to be AT LEAST 30 days old, and we MUST keep the last 5. | |
# Other than that, they can go. | |
# | |
# | |
# Set upt he environment for this - as we do in all scripts |
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
require 'java' | |
java_import 'java.util.concurrent.Executors' | |
java_import 'java.util.concurrent.TimeUnit' | |
module Enumerable | |
# From activesupport/lib/active_support/core_ext/enumerable.rb | |
def sum(identity = 0, &block) | |
if block_given? | |
map(&block).sum(identity) | |
else |
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
# encoding: utf-8 | |
require 'quantum_lead/application' | |
require 'singleton' | |
require 'logger' | |
require 'version' | |
require 'couchrest' | |
require 'java' | |
java_import 'java.util.concurrent.ConcurrentLinkedQueue' | |
class Database |
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 | |
# | |
# This script takes stdin and sends it to the QuantumLead Campfire room as | |
# Canadarm. This can take an optional '-p' argument so that the stdin will | |
# be treated as a "paste" and go in as a fix-edwidth font paste. Otherwise, | |
# it'll appear as a simple proportional font "message" | |
# | |
# Let's make sure all the commands we need are accessible to us... |
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
<html> | |
<head> | |
<title>Unpinned Merchants</title> | |
<script type='text/javascript' src='https://www.google.com/jsapi'></script> | |
<script type='text/javascript' src='zingchart/resources/jquery.min.js'></script> | |
<script type='text/javascript'> | |
google.load('visualization', '1', {packages:['table']}); | |
google.setOnLoadCallback(reload_executions); | |
// set up the fixed locations and paths for this metric visualization. | |
// we need to be able to pick the server (prod, uat, dev). |