Skip to content

Instantly share code, notes, and snippets.

Avatar

Jeriel Jan del Prado jerieljan

View GitHub Profile
@jerieljan
jerieljan / config.yml
Created Aug 10, 2014
This is my personal Flexget configuration file. Simply follow the Flexget Installation Guide and apply this config to your ~/.flexget/ directory.
View config.yml
# Flexget Config
# @author jerieljan
templates:
anime:
inputs:
- rss: { url: 'http://www.nyaa.eu/?page=rss&cats=1_37&filter=2', silent: yes, ascii: yes }
- rss: { url: 'http://tokyotosho.info/rss.php?filter=1', silent: yes, ascii: yes }
series:
settings:
@jerieljan
jerieljan / Job.java
Created Aug 7, 2014
Dealing with long-running, processor-intensive tasks happen, and sometimes, requests for the same tasks get triggered and your system ends up attempting to process the -same- thing multiple times. JobManager is an attempt to resolve that by taking note of each Task<Result> as Jobs, which takes care of assigning future reattempts into existing Jo…
View Job.java
/*
* Job
* v1.0
* June 18, 2014
*
* Copyright 2014, Jeriel Jan del Prado
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
@jerieljan
jerieljan / facebook-css.css
Last active Aug 29, 2015
Facebook - No Right Column, Collapsed Left Column
View facebook-css.css
#rightCol {
display:none !important;
}
#leftCol {
width:48px !important;
}
#leftCol:hover {
width:165px !important;
@jerieljan
jerieljan / SynchronizedRedisBlock.java
Created Jul 28, 2014
The SynchronizedRedisBlock can be used to create a self-isolating block of Redis transactions with a locking mechanism based on the key name provided. Implement by simply instantiating this class and placing all relevant Redis transactions when implementing #perform().
View SynchronizedRedisBlock.java
/*
* SynchronizedRedisBlock v1.0
* v1.0
* June 18, 2014
*
* Copyright 2014, Jeriel Jan del Prado
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
@jerieljan
jerieljan / custom_rules.xml
Created Jul 24, 2013
A custom_rules XML file in Ant for performing Robotium tests.
View custom_rules.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- custom_rules.xml contains a set of added functions for Ant to use. This includes useful macrodefs for
testing a particular test case or package, and you can even define your own that executes them for convenience. -->
<project name="RobotiumMyProject">
<property name="reports.dir" value="reports"/>
<property name="tests.dir" value="com.jerieljan.myproject.tests"/>
<target name="init-props">
@jerieljan
jerieljan / ShowListView.java
Created Jul 11, 2013
A slightly customized list view for displaying shows. Provides handling for touch event greed. This is used so that the main list will not deprive the ViewPager List from horizontal swipe events for changing displayed shows per channel.
View ShowListView.java
package ph.com.voyager.epg.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ListView;
/**
* A slightly customized list view for displaying shows. Provides handling for touch event greed.
* This is used so that the main list will not deprive the ViewPager List from horizontal swipe
View BitmapLruCache.java
package ph.com.voyager.epg.core.model.volley;
import com.android.volley.toolbox.ImageLoader;
import android.graphics.Bitmap;
import android.support.v4.util.LruCache;
/**
* A straightforward implementation of the {@link ImageLoader.ImageCache ImageCache} in LruCache
* provided by Android + Support Library.
View MySQLHandler.cs
// Copyright 2008 - Team Servo
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.Sql;
using System.Data.SqlClient;
using MySql.Data.MySqlClient;
View gist:2698282
//include:
//WebContent/WEB-INF/lib/log4j-1.2.16.jar
//src/Log4JServlet.java
import java.io.File;
import javax.servlet.ServletConfig;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;