Skip to content

Instantly share code, notes, and snippets.

View panchiz's full-sized avatar

Francisco Diaz panchiz

View GitHub Profile
@panchiz
panchiz / modules_to_puppetfile.sh
Last active March 23, 2016 19:18
Generate Puppetfile from metadata.json
#!/bin/bash
#
# List all the Puppet modules in an environment and generates the Puppetfile rows
# using the "metadata.json".
ENVIRONMENT=${1:-production}
MODULES="/etc/puppetlabs/code/environments/$ENVIRONMENT/modules"
RUBY_BIN=/opt/puppetlabs/puppet/bin/ruby
for metadata in $(ls $MODULES/*/metadata.json); do
@panchiz
panchiz / commit_file-sync.sh
Created March 17, 2016 20:24
Puppet File Sync Commit
#!/bin/bash
# Commit "/etc/puppetlabs/code-staging/" using Puppet File Sync
FILESYNC_CONF="/etc/puppetlabs/puppetserver/conf.d/file-sync.conf"
PUPPET_CONF="/etc/puppetlabs/puppet/puppet.conf"
MASTER=$(grep server $PUPPET_CONF | cut -d '=' -f2 | head -n1 | tr -d '[[:space:]]')
CERT=$(grep ssl-cert $FILESYNC_CONF | tr -d '"[[:space:]]' | cut -d':' -f2)
KEY=$(grep ssl-key $FILESYNC_CONF | tr -d '"[[:space:]]' | cut -d':' -f2)
CACERT=$(grep ssl-ca-cert $FILESYNC_CONF | tr -d '"[[:space:]]' | cut -d':' -f2)
@panchiz
panchiz / aws_s3_paperclip.acl
Last active August 29, 2015 14:26
AWS S3 paperclip ACL
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt0000000000000000",
"Effect": "Allow",
"Action": [
"s3:DeleteObject",
"s3:GetObject",
"s3:PutObject",
@panchiz
panchiz / download_wet_files.sh
Last active August 29, 2015 14:21
WET archives to HDFS
#!/usr/bin/env bash
#
# Download WET archives from February 2015 Crawl Archive.
# Exit immediately if a command exits with a non-zero status.
set -e
NUMBER_OF_WET=$1
if [ "empty$NUMBER_OF_WET" = "empty" ]; then
echo "Use: $0 <number of wet archives>"
#!/bin/bash
#
# Makes a full gzipped dump of a repote SVN repository.
# You must have installed subversion >= 1.7.
set -e
svn_repo=$1
if [ "X$svn_repo" = "X" ]; then
echo "You must supply the svn path"
package main
import (
"bufio"
"fmt"
"log"
"os"
"strconv"
"strings"
)

Paper Plane Animation (CSS)

A test animation loop of a paper plane flying through clouds.

This is 100% CSS, and the images are SVG.

A Pen by Jon Q on CodePen.

License.