Skip to content

Instantly share code, notes, and snippets.

View marcellodesales's full-sized avatar

Marcello DeSales marcellodesales

View GitHub Profile

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@marcellodesales
marcellodesales / force-directed graph-README.md
Last active January 2, 2016 15:39 — forked from mbostock/.block
force-directed graph

This simple force-directed graph shows character co-occurence in Les Misérables. A physical simulation of charged particles and springs places related characters in closer proximity, while unrelated characters are farther apart. Layout algorithm inspired by Tim Dwyer and Thomas Jakobsen. Data based on character coappearence in Victor Hugo's Les Misérables, compiled by Donald Knuth.

Compare this display to a force layout with curved links, a force layout with fisheye distortion and a matrix diagram.

#!/usr/bin/env python
# Compare a file on S3 to see if we have the latest version
# If not, upload it and invalidate CloudFront
import fnmatch
import os
import boto
import pprint
import re
@marcellodesales
marcellodesales / asciidoctor-revealjs
Created November 1, 2015 18:05 — forked from cmoulliard/asciidoctor-revealjs
Asciidoctor example for SlideShow HTML5 presentation using RevealJS
:description: RevealJS Template to create a beautiful HTML Slideshow
:backend: revealjs
:author: Charles Moulliard
:twitter: cmoulliard
:blog: http://cmoulliard.github.io
// Themes : default, beige, moon, blood, night, serif, simple, sky, solarized
:revealjs_theme: default
:linkattrs:
:idprefix:
#!/bin/bash
# Description: This script spins up a multi node Docker Swarm w/ Docker
# Networking and Consul discovery w/ Registrator
# Author: Ryan C Koch
# ryanckoch@gmail.com
# Usage: bash docker-playground.sh usage
usage ()
{
@marcellodesales
marcellodesales / aws-put-upload-ssec.sh
Last active September 13, 2016 22:14 — forked from imbradbrown/upload-ssec.sh
Uploading to Amazon S3 from curl with Server Side Encrpytion - Customer Provided Key used. Note that this uses the Amazon Access Keys which should be used with care.
#!/bin/bash
## file to upload.
S3_UPLOAD_FILE=some/path/file.txt
## Specify the bucket name here. This can be found in the S3 console
S3_BUCKET=bucket name here
## The desired path relative to the root of the bucket. All folders must be forward slash '/' separated
S3_DESTINATION_FILE=folder/folder2/file.txt
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1
@marcellodesales
marcellodesales / migrate-googlecode-svn-repos-to-github-using-docker.md
Last active September 30, 2020 17:51 — forked from yancyn/git-svn.md
Migrate Archive Google Code SVN to Git using Docker

Migrate Archive Google Code SVN to Git using Docker

The source-code and wiki pages migrated using Docker, no need to install other software

Requirements

  • git
  • docker

Result of the manual steps