Skip to content

Instantly share code, notes, and snippets.

View spalladino's full-sized avatar
🔷

Santiago Palladino spalladino

🔷
View GitHub Profile
@spalladino
spalladino / sample_manifest.xml
Created November 14, 2016 22:39
Sample Manifest
<?xml version="1.0" encoding="UTF-8" ?>
<verboice-service>
<name>Callback test</name>
<steps>
<step name="callback-test"
display-name="Callback test"
icon="medicalkit"
type="callback"
callback-url="http://requestb.in/y9fz04y9">
<settings>
@spalladino
spalladino / send_aos.rb
Created April 21, 2016 18:54
Sends AOs in bulk to Nuntium
require "rubygems"
require "nuntium"
SERVER = ""
ACCOUNT = ""
APPLICATION = ""
PASSWORD = ""
COUNT = 1000
FROM = ""
@spalladino
spalladino / app.js
Created April 1, 2016 17:49
Random placement of rectangles in a canvas based on minmax distance
HEIGHT = 800;
WIDTH = 1200;
CANDIDATES = 5;
INTERVAL = 1000;
var logos = [];
var tryPositionLogo = function(width, height) {
var candidate = null;
var candidateValue = null;
@spalladino
spalladino / brium-bot.js
Created March 22, 2016 14:05
V1 of Brium bot using Howdy Botkit
var os = require('os');
var fs = require('fs');
var http = require('http');
http.post = require('http-post');
var _ = require('lodash');
var Botkit = require('botkit');
var briumUrl = 'http://brium.me';
var main = function(slackToken, briumToken) {
@spalladino
spalladino / brium-dbsetup-job.yaml
Created March 17, 2016 16:50
Kubernetes sample config files for running Brium web app with a MySQL service on Google Container Engine
apiVersion: extensions/v1beta1
kind: Job
metadata:
name: brium-dbsetup
spec:
selector:
matchLabels:
app: brium-dbsetup
template:
metadata:
@spalladino
spalladino / verboice-user.sh
Created January 29, 2016 12:05
Manually change the password for the main user in a local installation of Verboice
# Go to Verboice main folder
cd verboice
# Open console
bundle exec rails c production
# Retrieve the first user
u = User.first
# This line should print the user's email, check that it is the one you expect
@spalladino
spalladino / letsencrypt.sh
Created January 20, 2016 15:24
Template for renewing a letsencrypt certificate in a docker nginx proxy via letsencrypt's docker image
#!/bin/sh
mkdir -p {{ proxy_dir }}/www/{{ domain }}
docker pull quay.io/letsencrypt/letsencrypt
docker run -it --rm --name letsencrypt \
-v "/etc/letsencrypt:/etc/letsencrypt" \
-v "/var/lib/letsencrypt:/var/lib/letsencrypt" \
--volumes-from {{ proxy_docker_container }} \
@spalladino
spalladino / database.yml
Last active June 20, 2017 17:58
Rake task to copy master development database into current database branch
<%
require 'config'
branch = `git rev-parse --abbrev-ref HEAD`.strip rescue nil
use_single_db = !Settings.db_per_branch || !branch || branch == 'master'
branch_spec = (use_single_db ? "" : "_#{branch}").underscore.gsub(/[\.\/\-]/, '_')
%>
development:
<<: *default
database: app_development<%= branch_spec %>
@spalladino
spalladino / mysql-docker.sh
Created December 22, 2015 13:47
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@spalladino
spalladino / keybase.md
Created August 31, 2015 15:21
Keybase proof

Keybase proof

I hereby claim:

  • I am spalladino on github.
  • I am spalladino (https://keybase.io/spalladino) on keybase.
  • I have a public key whose fingerprint is 2A1E 62DE 71BC 4FC5 08D1 4A61 DA26 E6C4 5CB6 8D15

To claim this, I am signing this object: