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:
| 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 |
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!' }) |
| import os | |
| import string | |
| def random_password(length=10): | |
| chars = string.ascii_uppercase + string.digits + string.ascii_lowercase | |
| password = '' | |
| for i in range(length): | |
| password += chars[ord(os.urandom(1)) % len(chars)] | |
| return password |
| from django.db.models.fields.related import ManyToManyField | |
| def to_dict(instance): | |
| opts = instance._meta | |
| data = {} | |
| for f in opts.concrete_fields + opts.many_to_many: | |
| if isinstance(f, ManyToManyField): | |
| if instance.pk is None: | |
| data[f.name] = [] | |
| else: |