Skip to content

Instantly share code, notes, and snippets.

View jcollado's full-sized avatar

Javier Collado jcollado

View GitHub Profile
@jcollado
jcollado / .gitignore
Created June 25, 2022 07:16
Use jinja2 templates to generate multiple terraform providers in a loop
# Doit database files
.doit.db.*
# Terraform files created from templates
_*.tf
@jcollado
jcollado / ftp_download.py
Created August 19, 2019 16:57
ftp upload and download scripts [python, ftplib]
#!/usr/bin/env python
"""Download a file from ftp server."""
import argparse
import logging
import os
from ftplib import FTP_TLS
@jcollado
jcollado / build.js
Last active October 2, 2015 00:05 — forked from juliangruber/build.js
console.log('BUILD env=%s', process.env.NODE_ENV)
@jcollado
jcollado / Arc Widget
Last active September 24, 2015 13:32 — forked from mbostock/.block
Arc Widget
This file is just used to control the name of the gist.
@jcollado
jcollado / email.js
Last active April 3, 2024 15:21
Send email with nodemailer and AWS SES (API or STMP)
var nodemailer = require('nodemailer');
var sesTransport = require('nodemailer-ses-transport');
var smtpPassword = require('aws-smtp-credentials');
var mailOptions = {
from: 'from@example.com',
to: 'to@example.com',
text: 'This is some text',
html: '<b>This is some HTML</b>',
};
@jcollado
jcollado / keybase.md
Created October 25, 2014 05:22
Keybase prove

Keybase proof

I hereby claim:

  • I am jcollado on github.
  • I am jcollado (https://keybase.io/jcollado) on keybase.
  • I have a public key whose fingerprint is 713E BEBF 3F84 F828 E373 34D6 0DDA 0A66 7FAB E1D2

To claim this, I am signing this object:

@jcollado
jcollado / sqlite_check_integrity.py
Created August 19, 2014 08:45
Look for sqlite database files and check their integrity
#!/usr/bin/python
"""Look for sqlite database files and check their integrity."""
import argparse
import logging
import os
import sqlite3
from contextlib import closing
from fnmatch import fnmatch
@jcollado
jcollado / conf.py
Created August 24, 2011 06:54
Mocking modules to prevent sphinx.ext.autodoc from failing on import
class Mock(object):
def __init__(self, *args):
pass
def __getattr__(self, name):
return Mock
for mod_name in ('pygtk', 'gtk', 'gobject', 'argparse'):
sys.modules[mod_name] = Mock()