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 'mixpanel_client' | |
require 'csv' | |
require 'multi_json' | |
require 'net/http' | |
class MixpanelExtract | |
attr_reader :filename, :request_uri | |
def initialize(config, for_date) | |
@client = Mixpanel::Client.new(config[:mixpanel_auth]) |
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
# This utilityi extracts schema of a JSON object | |
# It returns the keys of the JSON object separated by commas | |
# It also returns a create table statement in Hive | |
require '/var/lib/jenkins/scripts/lib/hive_utils.rb' | |
require 'json' | |
# This function should probably be in hive_utils.rb | |
def create_table_string(params) | |
header = "CREATE TABLE #{params[:hive_schema]}.#{params[:hive_table]}(" |
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 | |
# encoding: UTF-8 | |
# Simple password generation in Ruby. | |
# | |
# Generate reasonably secure random passwords of any chosen length, | |
# designed to be somewhat easy for humans to read and remember. | |
# Each password has a capitalized letter and a digit. | |
# | |
# Example: |
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
<!-- | |
Licensed to the Apache Software Foundation (ASF) under one or more | |
contributor license agreements. See the NOTICE file distributed with | |
this work for additional information regarding copyright ownership. | |
The ASF licenses this file to You under the Apache License, Version 2.0 | |
(the "License"); you may not use this file except in compliance with | |
the License. You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 |
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 | |
# Checks Hadoop and alerts if there is a change in data nodes | |
require 'yaml' | |
DFS_USED_PERCENT_THRESHOLD = 75 | |
error_flag = 0 | |
report = `hdfs dfsadmin -report` | |
# Datanodes available: 17 (28 total, 11 dead) |
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
<style> | |
.loc { | |
color:gray; | |
font-style:italic; | |
font-size:11px; | |
} | |
</style> | |
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js'></script> | |
<script type='text/javascript'> | |
$(document).ready(function() { |
NewerOlder