Skip to content

Instantly share code, notes, and snippets.

View avances123's full-sized avatar
🏠
Working from home

Fabio Rueda avances123

🏠
Working from home
View GitHub Profile
#!/usr/bin/ruby
# Download NASA MODIS imagery and use it as a desktop background.
# You'll need ImageMagick installed for this to work.
require 'date'
require 'net/http'
# Screen width/height
X = 1366
Y = 768
Test gist for wordpress gist shotcode plugin
@avances123
avances123 / README.md
Created November 28, 2012 18:39 — forked from dergachev/README.md
Vagrant tutorial

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

#!/usr/bin/env bash
# Check the availability of Nexus X devices.
#
# Install wget from Homebrew:
# $ brew install wget
#
# Setup OS X Mountain Lion to send mails from Terminal:
# $ sudo mkdir -p /Library/Server/Mail/Data/spool
# $ sudo /usr/sbin/postfix start
@avances123
avances123 / auth.wsgi
Last active December 15, 2015 10:29 — forked from jgeurts/install-graphite-ubuntu-12.04.sh
Install graphite with statsd and login/password auth
import md5
import os, sys
sys.path.append('/opt/graphite/webapp')
os.environ['DJANGO_SETTINGS_MODULE'] = 'graphite.settings'
from django.contrib.auth.models import User
from django import db
def check_password(environ, user, password):
import matplotlib
matplotlib.use('webagg')
import numpy as np
from scipy.special import binom
import matplotlib.pyplot as plt
from matplotlib.lines import Line2D
# On a Mac, use this script to generate secure deployment key
# To generate secure SSH deploy key for a github repo to be used from Travis
base64 --break=0 ~/.ssh/id_rsa_deploy > ~/.ssh/id_rsa_deploy_base64
ENCRYPTION_FILTER="echo \$(echo \"- secure: \")\$(travis encrypt \"\$FILE='\`cat $FILE\`'\" -r floydpink/harimenon.com)"
# If you don't have homebrew please install it from http://brew.sh/
brew install coreutils
gsplit --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_deploy_base64 id_rsa_
# To reconstitute the private SSH key from within the Travis-CI build (typically from 'before_script')
<user-avatar id="my-ids" class="my-classes" user="userObject"></user-avatar>
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected])
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
# encoding: utf8 1,1 Top# encoding: utf8
import argparse
from datetime import datetime
import json
from random import randint
import requests
import sys
from time import sleep