Skip to content

Instantly share code, notes, and snippets.

View monde's full-sized avatar
📼

Mike Mondragon monde

📼
  • Okta
View GitHub Profile
@monde
monde / main.tf
Created December 13, 2023 15:58
example of Okta Terraform bulk user import from CSV
terraform {
required_providers {
okta = {
source = "okta/okta"
}
}
}
locals {
users = csvdecode(file("./users.csv"))
@monde
monde / .gitignore
Last active February 19, 2020 19:02
Micro Gem to get an OAuth token and secret for the Tumblr.com API allowing an external application to post Tumblr.com blog.
Gemfile.lock
@monde
monde / watermark.rb
Created August 25, 2011 16:27
imagemagic watermark processor for Paperclip
module Paperclip
class Watermark < Processor
##
# A Paperclip::Processor for watermarking images with imagemagick's
# composite command.
#
# Place this code in lib/paperclip_processors/watermark.rb or into a Rails initializer.
#
# Example: All orginal files are resized to be at most 480 pixels in
@monde
monde / fluid.display.ascii.js
Created February 8, 2012 20:21
codes to Nick Kwiatek's ascii js animation page (http://nkwiatek.com/)
// this is in the process of being rewritten and optimized
/**
* Copyright (c) 2011 Nick Kwiatek <http://nkwiatek.com>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
@monde
monde / Gemfile
Last active December 14, 2015 06:49
A watcher script that pull URLs found in a Twitter feed and post them to the Capgun.io web thumb service for capture. Also, a Sintra App that will receive Capgun webhooks upon job completion and post the results to Tumblr.
source 'http://rubygems.org'
gem 'tumblr_client'
gem 'oauth'
gem 'sinatra'
gem 'json'
gem 'twitter'
gem 'capgun'
gem 'activesupport'
@monde
monde / delayed_textfield_helper.js
Created January 16, 2013 06:43
An Ember.js TextField and that has been extended to react to a change event after a certain amount of time has passed without any other events having occurred within the TextField.
App.DelayedTextField = Ember.TextField.extend({
// FIXME
// double check that init in Ember.TextSupport / Ember.TextSupport
// isn't handling this.on("paste"...) and the internal variable is still
// this._elementValueDidChange
init: function() {
this.on("propertychange", this, this._elementValueDidChange);
this.on("keyup", this, this._elementValueDidChange);
this.on("input", this, this._elementValueDidChange);
@monde
monde / IRB.conf-default.txt
Last active December 10, 2015 12:58 — forked from anonymous/README.md
notes for IRB lightening talk at Seattle.rb
% irb
irb(main):001:0> IRB.conf
=> CONF[:AP_NAME]="irb"
CONF[:AT_EXIT]=[]
CONF[:AUTO_INDENT]=false
CONF[:BACK_TRACE_LIMIT]=16
CONF[:CONTEXT_MODE]=3
CONF[:DEBUG_LEVEL]=1
CONF[:ECHO]=nil
CONF[:EVAL_HISTORY]=nil
[
"hello",
"world",
"teapot",
"hello",
"world",
"teapot",
"hello",
"world",
"teapot",
@monde
monde / capgun.coffee
Last active October 10, 2015 08:38
code examples accessing the capgun.io web thumbs and web captures service
# Description
# Grab web screens/thumbs of URLs using the capgun.io service
#
# Requires a CapGun API token to be set in the env var HUBOT_CAPGUN_TOKEN
#
# Dependencies:
# none
#
# Configuration:
# HUBOT_CAPGUN_TOKEN
@monde
monde / honeybadger_resque.rb
Created August 4, 2012 05:09
Honeybadger based error reporting backend for Resque
# for Rails place in config/initializers/honeybadger_resque.rb
%w( resque honeybadger ).each do |gem|
begin
require gem
rescue LoadError
raise "Can't find '#{gem}' gem. Please add it to your Gemfile or install it."
end
end