Skip to content

Instantly share code, notes, and snippets.

Avatar

Mike Greiling mikegreiling

View GitHub Profile
@mikegreiling
mikegreiling / github_issue_stats_webtask.js
Created Jan 29, 2016
A simple Auth0 webtask (webtask.io) for IFTTT which saves GitHub issue ages indexed by issue label(s) upon issue close
View github_issue_stats_webtask.js
var moment = require('moment');
var parallel = require('async').parallel;
var MongoClient = require('mongodb').MongoClient;
function update_label_stats(label, age, db, cb) {
var where = {
label: label
};
var update = {
@mikegreiling
mikegreiling / gcal-backup.sh
Last active Aug 29, 2015
Simple cron script to backup a Google Calendar to Amazon S3 (http://pixelcog.com/blog/2014/backup-gcal-to-s3/)
View gcal-backup.sh
#!/bin/sh
export TZ=America/Chicago
export PATH=/usr/local/bin:$PATH # ensure path to aws exists for chrontab
# uncomment if needed
#export AWS_ACCESS_KEY_ID=ABCDEFGHIJKLMNOPQRST
#export AWS_SECRET_ACCESS_KEY=1234567890ABCDEFGHIJKLMNOPQRSTUV
bucket="my-bucket-name"
gcal_private_key="example.com_b6nffmu1v5v4jehogm9v5anll4%40group.calendar.google.com/private-4463bc3c4777e7d435cc385f9b3573a0"
@mikegreiling
mikegreiling / bookmarklet.js
Last active Aug 29, 2015
Xdebug Toggle Bookmarklet (With WebKit Notifications)
View bookmarklet.js
/*
Adapted from http://pollinimini.net/blog/xdebug-bookmarklet/
WebKit notifications added
©2014 PixelCog Inc. MIT License
*/
(function() {
var idekey = '',
minutes = 10,
exp = new Date(),
@mikegreiling
mikegreiling / opsworks-agent-downloader.py
Created Jul 8, 2014
Download all available versions of aws 'opsworks-agent-installer.tgz' for examination
View opsworks-agent-downloader.py
#!/usr/bin/env python
import os, time, urllib2, shutil, urlparse
def main():
for version in range(450):
try:
url = 'https://opsworks-instance-agent.s3.amazonaws.com:443/%d/opsworks-agent-installer.tgz' % version
filename = 'opsworks-agent-installer-%03d.tgz' % version
download(url, filename)
@mikegreiling
mikegreiling / attributes.json
Created May 8, 2014
AWS OpsWorks Deploy - Attribute Dump
View attributes.json
{
"opsworks": {
"activity": "deploy",
"sent_at": 1399533119,
"deployment": "33cb5d91-27c8-4e71-9d3e-e7925e5caa03",
"layers": {
"php-app": {
"name": "PHP App Server",
"id": "73271990-452b-4e5f-8a71-619e6441a447",
"elb-load-balancers": [
@mikegreiling
mikegreiling / GitInfo.php
Created Feb 5, 2013
git parser class and example usage...
View GitInfo.php
<?php
/**
* ArkOwl Fraud Verification Service
*
* @copyright Copyright 2012, ArkOwl LLC. (http://arkowl.com) All Rights Reserved
*/
namespace app\extensions;
class GitInfo {
View StripeTutorialPage.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
You can’t perform that action at this time.