Skip to content

Instantly share code, notes, and snippets.

View wolfdancer's full-sized avatar

Shane Duan wolfdancer

View GitHub Profile
@wolfdancer
wolfdancer / .gitignore
Created February 15, 2012 04:52 — forked from karmi/.gitignore
Script to generate PDF cards suitable for planning poker from Pivotal Tracker [http://www.pivotaltracker.com/] CSV export. Inspired by Bryan Helmkamp's http://github.com/brynary/features2cards/
.DS_Store
*.csv
*.pdf
@wolfdancer
wolfdancer / znc.conf
Created February 10, 2014 21:58
ZNC Configuration that works with two clients: PC and Phone
// WARNING
//
// Do NOT edit this file while ZNC is running!
// Use webadmin or *controlpanel instead.
//
// Buf if you feel risky, you might want to read help on /znc saveconfig and /znc rehash.
// Also check http://en.znc.in/wiki/Configuration
// shaneduan comment:
// This is the ZNC configuration that suppots the following features:
<?php
// WEB TRANSACTION CONFIG WIZARD
//
// Copyright (c) 2008-2009 Nagios Enterprises, LLC. All rights reserved.
//
// $Id: webtransaction.inc.php 949 2012-12-20 18:31:39Z swilkerson $
//
// TODO
// * Read timeout and global timeout values from last run (look at config.xml file)

##Google Interview Questions: Product Marketing Manager

  • Why do you want to join Google? -- Because I want to create tools for others to learn, for free. I didn't have a lot of money when growing up so I didn't get access to the same books, computers and resources that others had which caused money, I want to help ensure that others can learn on the same playing field regardless of their families wealth status or location.
  • What do you know about Google’s product and technology? -- A lot actually, I am a beta tester for numerous products, I use most of the Google tools such as: Search, Gmaill, Drive, Reader, Calendar, G+, YouTube, Web Master Tools, Keyword tools, Analytics etc.
  • If you are Product Manager for Google’s Adwords, how do you plan to market this?
  • What would you say during an AdWords or AdSense product seminar?
  • Who are Google’s competitors, and how does Google compete with them? -- Google competes on numerous fields: --- Search: Baidu, Bing, Duck Duck Go
@wolfdancer
wolfdancer / gist:3f9ea5c845907ee18311
Created May 12, 2014 22:32
create sms notification
Background informaiton: Using raxmon to configure Cloud Monitoring (http://developer.rackspace.com/blog/using-raxmon-to-configure-rackspace-cloud-monitoring.html)
sduan@Shanes-MacBook-Pro ~ $ raxmon-notifications-list [ruby-1.9.3-p484]
<Notification: id=ntDbF0gzzN, label=rackspace email, type=email ...>
<Notification: id=ntTechnicalContactsEmail, label=Email All Technical Contacts, type=technicalContactsEmail ...>
<Notification: id=ntjiCBpG61, label=pagerduty, type=pagerduty ...>
sduan@Shanes-MacBook-Pro ~ $ raxmon-notifications-create --label=sms --type=sms --details="phone_number=+15555555555" [ruby-1.9.3-p484]
Resource created. ID: ntByLFhHhM
@wolfdancer
wolfdancer / ping_and_filesystem_check_server_side_monitoring_configuration.md
Last active August 29, 2015 14:01
Step-by-step Instruction to set up Ping and Filesystem check with Server-Side Monitoring Configuration

Summary

This is a step-by-step instruction to manually set up Cloud Monitoring through the server-side configuration feature to get familiar with the process. The target use case for this is for automation like Chef Cookbook, Ansible Playbook or scripts.

In this example, we are going to set up the filesystem check because it is always a good idea to get notified BEFORE you run out of space. We are going to use Ubuntu as the example OS to simplify the steps.

Steps

  • Upgrade agent
  • Create YAML file
@wolfdancer
wolfdancer / heat-grafana-cloudmetrics.yaml
Last active August 29, 2015 14:09
heat-grafana-cloudmetrics.yaml
heat_template_version: 2013-05-23
description: >
Puts together a server that will run Grafana using Cloud Metrics data.
parameter_groups:
- label: 'Server Settings'
parameters:
- flavor
- image
@wolfdancer
wolfdancer / grafana-mysql-dashboard-cloudmetrics.json
Created November 11, 2014 02:29
mysql dashboard cloud metrics
{
"title": "Grafana",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"rows": [
{
"title": "Welcome to Grafana",
"height": "210px",
@wolfdancer
wolfdancer / export.py
Created November 25, 2014 06:12
monitornig check export
#!/usr/bin/env python3
"""
This script will hit the monitoring API, pull monitoring configuration on the specified entty and check,
then generate yaml config file
To use:
./export.py --user <username> --api-key <api key> --entity <entity-id> --check <check-id>
"""
import argparse
@wolfdancer
wolfdancer / import.py
Created November 25, 2014 06:14
import monitornig configuration
#!/usr/bin/env python3
"""
This script will load the monitoring configuration yaml file for the server-side configuratino,
hit the monitoring API to create the checks and alarms
To use:
./import.py --user <username> --api-key <api key> --entity <entity-id> --file <yaml file>
"""
import argparse