Skip to content

Instantly share code, notes, and snippets.


Christopher DeCairos cadecairos

View GitHub Profile
cadecairos / case.js
Created Sep 21, 2017
retrieveSubscription timeout with customer expand
View case.js
// this function process a webhook event received from Stripe
function(request, reply) {
var event = request.payload;
var charge =;
if (event.type !== 'charge.succeeded') {
return reply('This hook only processes charge succeeded events');
cadecairos / reclaimWindows10.ps1
Created Jan 11, 2017 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via (different defaults)
View reclaimWindows10.ps1
# Win10 Initial Setup Script
# Author: Disassembler <>
# Version: 1.7, 2016-08-15
# dasm's script:
# This script leaves more MS defaults on, including MS security features.
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1
View openbadges_redirects_S3.xml
View gist:2368d2582be4ccfd3715817922ba420d
Utils.generateUUID = function() {
var d = new Date().getTime();
var uuid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {
var r = (d + Math.random()*16)%16 | 0;
d = Math.floor(d/16);
return (c=='x' ? r : (r&0x7|0x8)).toString(16);
return uuid;
View gist:2535107a6c00291c44fae2ab94a9690e
commit 8b8d3239d7418f4225a5a6d722e1b257913bc1dc
Author: Mike Kamermans <>
Date: Mon Sep 26 10:33:05 2016 -0700
Hackfix (#2238)
* prevent WP hack attempts by locking down the stub format
* make sure we get JSON
View DNT_Check.js
function WebAnalytics() {
var _dntStatus = navigator.doNotTrack || navigator.msDoNotTrack;
var fxMatch = navigator.userAgent.match(/Firefox\/(\d+)/);
var ie10Match = navigator.userAgent.match(/MSIE 10/i);
var w8Match = navigator.appVersion.match(/Windows NT 6.2/);
View badges_issued_by_day.sql
CAST(badge.validated_on AS DATE) AS day,
COUNT(*) AS 'Badges Issued'
GROUP BY year(day), month(day), day(day);
View session_emails.js
const hatchet = require('hatchet');
const sessionData = require('./session_data.json');
sessionData.forEach((session) => {
hatchet.send("mozfest_session_proposal_2016", session, (err, response) => {
if (err) {
console.log("Failed to send proposal confirmation email.")
} else {
console.log(`Proposal confirmation email successfully sent to ${}!`)
cadecairos /
Last active Sep 2, 2016
Script to automate database upgrades on Heroku
set -e
old_db_url=`heroku config:get -a $app $OLD_DB_ENV_VAR`
new_db_url=`heroku config:get -a $app $new_db_env_var`

Keybase proof

I hereby claim:

  • I am cadecairos on github.
  • I am cadecairos ( on keybase.
  • I have a public key whose fingerprint is AB41 5ACC 0180 A407 451F 3FE6 10E6 346E EE2F 659D

To claim this, I am signing this object:

You can’t perform that action at this time.