Skip to content

Instantly share code, notes, and snippets.

View acidtib's full-sized avatar

Dainel Vera acidtib

View GitHub Profile
@acidtib
acidtib / ffmpeg.rb
Created May 10, 2012 01:34 — forked from Flamefork/ffmpeg.rb
ffmpeg & carrierwave
module CarrierWave
module FFMPEG
extend ActiveSupport::Concern
module ClassMethods
def faststart
process :faststart => true
end
def transcode options
@acidtib
acidtib / controller.rb
Created August 8, 2012 16:44 — forked from thomasv314/controller.rb
Multi File Upload with Rails 3 & PaperClip & jQuery
class ArtistsController < ApplicationController
def create_bid
#this is where we delete the images array so that we can
#add them to the model separately afterwards
bids = params[:art_bid].delete(:bid_images)
@artist = Artist.find(params[:id])
@art_bid = ArtBid.new(params[:art_bid])
@acidtib
acidtib / check.js
Created October 8, 2012 14:22 — forked from thomasv314/check.js
// JSON Array of Towns.. In Rails: <%= @towns = Town.all.to_json %>
var TOWNS = [
{ town: "Abbeville city", id: 1 },
{ town: "Adamsville city", id: 2 },
{ town: "Addison Town", id: 3 }
];
$(document).ready(function() {
$('#postcard_city').bind('change', updateStateValue);
@acidtib
acidtib / check.js
Created December 5, 2012 16:06 — forked from thomasv314/check.js
// JSON Array of Towns.. In Rails: <%= @towns = Town.all.to_json %>
var TOWNS = [
{ town: "Abbeville city", id: 1 },
{ town: "Adamsville city", id: 2 },
{ town: "Addison Town", id: 3 }
];
$(document).ready(function() {
$('#postcard_city').bind('change', updateStateValue);
$('#nameOfDivId').on('change', function(event){
if($(this).width() > 100%)
//remove it
});
<?php
date_default_timezone_set('America/New_York');
echo "America/New_York time: ".time();
date_default_timezone_set('UTC');
echo "UTC Time: ".time();
?>
# config.ru for Pow + Wordpress, based on http://stuff-things.net/2011/05/16/legacy-development-with-pow/
# added hackery to work around wordpress issues - Patrick Anderson ([email protected])
# added rubygems, replaced script_path with script from path_parts, added to_return to fix return error - Paul Cook
# clearly this could be cleaner, but it does work
# added rewrite rule for WordPress Multi Site - Per Soderlind (see also http://soderlind.no/archives/2012/12/02/wordpress-and-pow/)
require 'rubygems'
require 'rack'
require 'rack-legacy'
require 'rack-rewrite'
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;
********* SCSS STYLING **********
.dropdown-list {
border: 1px solid #ddd;
max-width: 600px;
width: 100%;
margin: 15px auto;
background: #FFF;
height: 36px;
overflow: hidden;
@acidtib
acidtib / Rakefile
Created November 14, 2013 14:51 — forked from rjsamson/Rakefile
# -*- coding: utf-8 -*-
$:.unshift("/Library/RubyMotion/lib")
require 'motion/project/template/osx'
Motion::Project::App.setup do |app|
# Use `rake config' to see complete project settings.
app.name = 'MenubarApp'
app.info_plist['NSUIElement'] = 1
end