Skip to content

Instantly share code, notes, and snippets.

View jaizquierdogalan's full-sized avatar
🎯
Focusing

Jonathan A. Izquierdo jaizquierdogalan

🎯
Focusing
View GitHub Profile
@jaizquierdogalan
jaizquierdogalan / headless.md
Created June 6, 2019 11:32 — forked from addyosmani/headless.md
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

apiVersion: batch/v1beta1
kind: CronJob
metadata:
annotations:
name: ecr-cred-helper
namespace: default
spec:
concurrencyPolicy: Allow
failedJobsHistoryLimit: 1
jobTemplate:
@jaizquierdogalan
jaizquierdogalan / __readme.md
Created December 19, 2018 10:27 — forked from maxivak/__readme.md
Building Docker image with Packer and provisioning with Ansible

Building Docker image with Packer and provisioning with Ansible

Overview

Packer

  • Packer is used to build image from a base image, perform provisions and store (commit) the final image.

  • We use provisioners and Packer templates to do the actual work to create the final image.

  • We use Ansible for provisioning.

@jaizquierdogalan
jaizquierdogalan / idling.py
Created June 6, 2018 10:36 — forked from chiradeep/idling.py
boto script to find and stop idle instances
import argparse
import boto3
import datetime
from dateutil.tz import tzutc
def is_in_autoscale_group(region, instance_id):
asg = boto3.client('autoscaling', region_name=region)
instances = \
asg.describe_auto_scaling_instances(InstanceIds=[instance_id])
1. Install dependencies for PHP 7.1
$ brew update
$ brew tap homebrew/dupes
$ brew install autoconf automake gmp homebrew/versions/bison27 gd freetype t1lib gettext zlib mcrypt
2. Configure PHP 7.1
$ git clone --depth=1 https://github.com/php/php-src.git
$ cd php-src

$ ./buildconf

@jaizquierdogalan
jaizquierdogalan / ajax-form.js
Created June 9, 2016 15:43 — forked from havvg/ajax-form.js
jQuery AJAX form submit with Twitter Bootstrap modal
jQuery(function($) {
$('form[data-async]').live('submit', function(event) {
var $form = $(this);
var $target = $($form.attr('data-target'));
$.ajax({
type: $form.attr('method'),
url: $form.attr('action'),
data: $form.serialize(),
@jaizquierdogalan
jaizquierdogalan / gist:30fe15b7d6acfdad481e
Created February 8, 2016 12:15 — forked from saetia/gist:1623487
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat
@jaizquierdogalan
jaizquierdogalan / deploy-symfony-2.sh
Created January 28, 2016 17:41 — forked from matteocaberlotto/deploy-symfony.sh
A simple bash script to deploy symfony 2 applications (multiple environment)
#!/bin/bash
# include config
# config example below:
#
#
# Example deploy_config.sh
#
# dev_env() {