Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Facundo Farias facundofarias

🏠
Working from home
View GitHub Profile
@facundofarias
facundofarias / gist:53d9322aeeed4f52b700
Last active Aug 29, 2015
Hide Apache information with ServerTokens and ServerSignature directives (CentOS + Httpd24)
View gist:53d9322aeeed4f52b700
# 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 Apr 20, 2015
Quartz JobFactory implementation using HK2
View DefaultJobFactory.java
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;
View gist:178cc64c89a874171649
@facundofarias
facundofarias / MeanTimeOfDay.js
Last active Aug 29, 2015
Time circular mean calculation
View MeanTimeOfDay.js
/**
* 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 Dec 4, 2013
PhoneList Coding Problem
View PhoneList
/**
* 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;
You can’t perform that action at this time.