I hereby claim:
- I am juanmhidalgo on github.
- I am juanmhidalgo (https://keybase.io/juanmhidalgo) on keybase.
- I have a public key ASCfBU_Vvl3YdV60konL0fxh2_Lvfva8csEldxW4rDl46Qo
To claim this, I am signing this object:
String.prototype.toSlug = function(){ | |
st = this.toLowerCase(); | |
st = st.replace(/[\u00C0-\u00C5]/ig,'a') | |
st = st.replace(/[\u00C8-\u00CB]/ig,'e') | |
st = st.replace(/[\u00CC-\u00CF]/ig,'i') | |
st = st.replace(/[\u00D2-\u00D6]/ig,'o') | |
st = st.replace(/[\u00D9-\u00DC]/ig,'u') | |
st = st.replace(/[\u00D1]/ig,'n') | |
st = st.replace(/[^a-z0-9 ]+/gi,'') | |
st = st.trim().replace(/ /g,'-'); |
Resources: | |
sslSecurityGroupIngress: | |
Type: AWS::EC2::SecurityGroupIngress | |
Properties: | |
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]} | |
IpProtocol: tcp | |
ToPort: 443 | |
FromPort: 443 | |
CidrIp: 0.0.0.0/0 |
#!/bin/bash | |
reset='\033[0m' | |
bold='\033[1m' | |
dim='\033[2m' | |
bg_black='\033[40m' | |
yellow='\033[33m' | |
COUNTER=0 | |
COUNTER_SORT=0 |
/*! | |
* isVis - v0.5.6 Sep 2012 - Page Visibility API Polyfill | |
* Copyright (c) 2011 Addy Osmani | |
* Dual licensed under the MIT and GPL licenses. | |
*/ | |
/* | |
* Firefox support added based on https://developer.mozilla.org/en-US/docs/DOM/Using_the_Page_Visibility_API | |
* @juanmhidalgo | |
*/ |
I hereby claim:
To claim this, I am signing this object:
import calendar | |
from datetime import datetime, timedelta | |
def monthly_range(dt_start, dt_end): | |
forward = dt_end >= dt_start | |
finish = False | |
dt = dt_start | |
while not finish: | |
yield dt.date() |
def get_days_of_month(year, month): | |
import calendar | |
return calendar.monthrange(year,month)[1] |
#!/usr/bin/perl -w | |
use strict; | |
use IO::Socket::INET; | |
use IO::Socket::SSL; | |
use Getopt::Long; | |
use Config; | |
$SIG{'PIPE'} = 'IGNORE'; #Ignore broken pipe errors | |
print <<EOTEXT; |
;(function() { | |
window.throttle = function (type, name, obj) { | |
obj = obj || window; | |
var running = false; | |
var func = function () { | |
if (running) { return; } | |
running = true; | |
requestAnimationFrame(function () { | |
var event; |
from django.template.loader import render_to_string | |
email_body = render_to_string("my_email_template.txt", { 'name': 'Bob', | |
'message': 'Hello!' }) |