Skip to content

Instantly share code, notes, and snippets.

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

Facundo Farias facundofarias

🏠
Working from home
View GitHub Profile
@facundofarias
facundofarias / amf.sh
Created March 31, 2016 13:55
Apache Mobile Filter (AMF) installation on Ubuntu
apt-add-repository ppa:pakin/other
apt-get update
apt-get install libapache2-apachemobilefilter-perl
@facundofarias
facundofarias / gist:53d9322aeeed4f52b700
Last active August 29, 2015 14:22
Hide Apache information with ServerTokens and ServerSignature directives (CentOS + Httpd24)
# Open httpd.conf file
$ vi httpd.conf
# Append/modify config directive as follows:
ServerSignature Minimal
ServerTokens Prod
Header always append X-Frame-Options SAMEORIGIN
# Save and close the file. Then, check the configurations
$ apachectl configtest
@facundofarias
facundofarias / DefaultJobFactory.java
Created April 20, 2015 10:09
Quartz JobFactory implementation using HK2
import javax.inject.Inject;
import javax.inject.Singleton;
import org.glassfish.hk2.api.ServiceLocator;
import org.jvnet.hk2.annotations.Service;
import org.quartz.Job;
import org.quartz.JobDetail;
import org.quartz.spi.JobFactory;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
@facundofarias
facundofarias / gist:178cc64c89a874171649
Created September 5, 2014 08:24
Installing jRuby on OSX
@facundofarias
facundofarias / MeanTimeOfDay.js
Last active August 29, 2015 14:04
Time circular mean calculation
/**
* Created by ffarias on 2/4/14.
*/
var meanTimeOfDay =
{
timeToDegrees: function (datetime) {
return (360 * datetime.getHours() / 24.0 + 360 * datetime.getMinutes() / (24 * 60.) + 360 * datetime.getSeconds() / (24 * 3600.0));
},
@facundofarias
facundofarias / PhoneList
Created December 4, 2013 16:35
PhoneList Coding Problem
/**
* Created with IntelliJ IDEA.
* User: ffarias
* Date: 11/29/13
* Time: 9:46 AM
* To change this template use File | Settings | File Templates.
*/
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;