Skip to content

Instantly share code, notes, and snippets.

Mateus Miranda mmiranda

Block or report user

Report or block mmiranda

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:8e119ee8d458268aafd2dff9a795e738
### Keybase proof
I hereby claim:
* I am mmiranda on github.
* I am mateusmiranda (https://keybase.io/mateusmiranda) on keybase.
* I have a public key ASBhW_HTCTME-V4m2Fj5MA9w5-PR0qca92uvP40siEazygo
To claim this, I am signing this object:
View jquery.msg.min.js
/* Copyright 2011, Ben Lin (http://dreamerslab.com/)
* Licensed under the MIT License (LICENSE.txt).
*
* Version: 1.0.6
*
* Requires:
* jQuery 1.3.0+,
* jQuery Center plugin 1.0.0+ https://github.com/dreamerslab/jquery.center
*/
;(function(d,e){var a={},c=0,f,b=[function(){}];d.msg=function(){var g,k,j,l,m,i,h;j=[].shift.call(arguments);l={}.toString.call(j);m=d.extend({afterBlock:function(){},autoUnblock:true,center:{topPercentage:0.4},css:{},clickUnblock:true,content:"Please wait...",fadeIn:200,fadeOut:300,bgPath:"",klass:"black-on-white",method:"appendTo",target:"body",timeOut:2400,z:1000},a);l==="[object Object]"&&d.extend(m,j);i={unblock:function(){g=d("#jquery-msg-overlay").fadeOut(m.fadeOut,function(){b[m.msgID](g);g.remove();});clearTimeout(f);}};h={unblock:function(o,n){var p=o===undefined?0:o;m.msgID=n===undefined?c:n;setTimeout(function(){i.unblock();},p);},replace:function(n){if({}.toString.call(n)!=="[object String]"){throw"$.msg('replace'); error: second argument has to be a string";}d("#jquer
@mmiranda
mmiranda / aws-launch-instance.rb
Last active Oct 10, 2017
This snippet creates an instance on AWS EC2.
View aws-launch-instance.rb
# How to execute:
# 1. Make sure you have optparse and aws-sdk gem installed
# 2. Run: ruby aws-launch-instance.rb -a YOUR-ACCESS_KEY -s YOUR-SECRET-KEY -r eu-central-1 -t t2.micro
require 'optparse'
require 'aws-sdk'
# Collect parameters
options = {}
optparse = OptionParser.new do |opts|
You can’t perform that action at this time.