Skip to content

Instantly share code, notes, and snippets.

View ffullenk's full-sized avatar

Francisco Fullenkamp ffullenk

View GitHub Profile
# config/initializers/carrierwave_direct.rb
require "carrierwave_direct"
module CarrierWaveDirect
module SignatureFixMonkeyPatch
def policy(options = {})
options[:expiration] ||= upload_expiration
options[:min_file_size] ||= min_file_size
options[:max_file_size] ||= max_file_size
@ffullenk
ffullenk / TokensController
Last active August 29, 2015 14:02
TokensController
class Api::V1::TokensController < ApplicationController
skip_before_filter :verify_authenticity_token
respond_to :json
def create
email = params[:email]
password = params[:password]
if request.format != :json
render :status=>406, :json=>{:message=>"The request must be json"}
@ffullenk
ffullenk / sparkline stacked bar chart
Created June 12, 2014 00:22
javascript sparkline for stacked bar chart
$("#sparkline").sparkline([0,0,20,12,9,7], {
type: 'bullet',
targetWidth: 0,
targetColor: '#',
performanceColor: '#',
rangeColors: ['#d3dafe','#a8b6ff','#7f94ff','#2f14ff ']});
@ffullenk
ffullenk / Stacked bar chart
Created June 12, 2014 00:20
stacked horizontal bar chart dxChart
var dataSource = [
{ state: "Germany", young: 6.7, middle: 28.6, older: 5.1 }
];
$("#chartContainer").dxChart({
dataSource: dataSource,
rotated: true,
commonAxisSettings: {
label: { visible: false },
grid: { visible: false }
$("#ingreso_departamento_id").change(function(){
if($(this).val() >0){
$.get('/show_nombre_propietario/'+ $(this).val(), function(data) {
$('#ingreso_propietario').val(data);
$('#ingreso_propietario').parent().parent().show('slow');
});
}
});
@ffullenk
ffullenk / csspattern
Created September 15, 2013 01:29
sazoot footer css pattern
background-color: #026873;
background-size: 13px 13px, 29px 29px, 37px 37px, 53px 53px;
background-image: -webkit-linear-gradient(0, rgba(255,255,255,.07) 50%, transparent 50%),
-webkit-linear-gradient(0, rgba(255,255,255,.13) 50%, transparent 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(255,255,255,.17) 50%),
-webkit-linear-gradient(0, transparent 50%, rgba(255,255,255,.19) 50%);
background-image: -moz-linear-gradient(0, rgba(255,255,255,.07) 50%, transparent 50%),
-moz-linear-gradient(0, rgba(255,255,255,.13) 50%, transparent 50%),
-moz-linear-gradient(0, transparent 50%, rgba(255,255,255,.17) 50%),
-moz-linear-gradient(0, transparent 50%, rgba(255,255,255,.19) 50%);