Skip to content

Instantly share code, notes, and snippets.

Javier Tomas Zon jtomaszon

Block or report user

Report or block jtomaszon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View chart.controller.js
(function () {
'use strict';
angular.module('app.chart')
.controller('flotChartCtrl', ['$scope', '$http', flotChartCtrl]);
function flotChartCtrl($scope, $http) {
var areaChart, lineChart1;
lineChart1 = {};
@jtomaszon
jtomaszon / HowTo-AWS_Free-tier.MD
Created Apr 10, 2016
Create your own Free-tier Infrastructure from your terminal
View HowTo-AWS_Free-tier.MD

Install awscli

sudo -H pip install awscli --ignore-installed six

Collecting awscli [..]

Installing collected packages: pyasn1, rsa, futures, jmespath, six, python-dateutil, docutils, botocore, s3transfer, colorama, awscli Successfully installed awscli-1.10.19 botocore-1.4.10 colorama-0.3.3 docutils-0.12 futures-3.0.5 jmespath-0.9.0 pyasn1-0.1.9 python-dateutil-1.5 rsa-3.3 s3transfer-0.0.1 six-1.4.1

View gist:60debd8121fed099b438
### Keybase proof
I hereby claim:
* I am jtomaszon on github.
* I am javierzon (https://keybase.io/javierzon) on keybase.
* I have a public key whose fingerprint is 3561 72D9 D29B A1F9 A0CD 58D0 BD72 F2FB 08B7 9E61
To claim this, I am signing this object:
@jtomaszon
jtomaszon / cleanupReleases.sh
Created Feb 19, 2015
A nice script to cleanup some 'cap' releases
View cleanupReleases.sh
#!/bin/bash
# If not set APP_DIR variable, fail
[ -z ${APP_DIR} ] && echo "Usage: Define APP_DIR before the script" && exit 1
LOG=/home/user/cleanupReleases.log
logger -p info -t cleanupReleases "Starting cleanup on ${APP_DIR}... "
CLEANUP=$(ls -dt ${APP_DIR}/releases/* | awk 'NR>1')
[ -z "$CLEANUP" ] && echo "Nothing to cleanup" && exit 2
@jtomaszon
jtomaszon / sysctl.conf
Last active Jul 12, 2017
sysctl compile variables
View sysctl.conf
### IMPROVE SYSTEM MEMORY MANAGEMENT ###
# Increase size of file handles and inode cache
fs.file-max = 2097152
# Do less swapping
vm.swappiness = 1
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2
vm.zone_reclaim_mode = 0
View html5-video-streamer.js
/*
* Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js
*/
var http = require('http'),
fs = require('fs'),
util = require('util');
http.createServer(function (req, res) {
var path = 'video.mp4';
You can’t perform that action at this time.