Skip to content

Instantly share code, notes, and snippets.

View jsanti's full-sized avatar

Jorge Santiago jsanti

  • Medellín, Colombia
View GitHub Profile
group :assets do
gem 'sass-rails', '~> 4.0.0.beta1'
gem 'coffee-rails', '~> 4.0.0.beta1'
gem 'sprockets-rails', :require => 'sprockets/railtie'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
gem 'uglifier', '>= 1.0.3'
end
#!/bin/sh
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
url=$inputline
#!/bin/zsh
DB_NAME=$1
SSH_USER=''
SSH_SERVER=''
BACKUPS_DIR='/backup/full_backups'
DATE=`date +"%Y-%m-%d"`
DIR_NAME="${DATE}_daily"
FULL_BACKUP_PATH="$BACKUPS_DIR/$DIR_NAME"
BACKUP_FILES=( "DUMP_SAPEC_$DATE.sql.gz" "SHARED_SAPEC_$DATE.tar.gz" )
@jsanti
jsanti / repair_utf8_iso88591_mix.perl
Created November 23, 2010 17:52
Repairing broken documents that mix UTF-8 and ISO-8859-1
#!/usr/bin/perl
#
# Repairing broken documents that mix UTF-8 and ISO-8859-1
# http://plasmasturm.org/log/416/
#
use strict;
use warnings;
use Encode qw( decode FB_QUIET );
' Color row grops in Excel with alternating colors
Public Sub HighLightRows()
Dim i As Integer
i = 3
Dim color1 As Integer
color1 = 2 'white
Dim color2 As Integer
color2 = 15 'gray
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
#!/usr/bin/env ruby
require 'rubygems'
require 'mp3info'
series = { 1 => "I", 2 => "II", 3 => "III", 4 => "IV", 5 => "V"}
1.upto(5) do |i|
Dir.glob("Nivel #{i}/*.mp3").each do |entry|
dirname = File.expand_path(File.dirname(entry))
@jsanti
jsanti / facebox.sass
Created February 9, 2010 22:30
facebox.sass
#facebox
:position absolute
:top 0
:left 0
:z-index 100
:text-align left
.b
:background url(/images/facebox/b.png)
.tl
:background url(/images/facebox/tl.png)
class Status
STATUS_CODES = { :queued => 0,
:running => 1,
:error => 2,
:success => 3 }
STATUS_NAMES = { :queued => "En cola de espera",
:running => "En ejecución",
:error => "Terminado con errores",
:success => "Terminado sin errores" }
@jsanti
jsanti / test.rb
Created May 28, 2009 23:46
Current testing stack
config.gem "rspec", :version => '>=1.2.6', :lib => false
config.gem "rspec-rails", :version => '>=1.2.6', :lib => false
config.gem "remarkable_rails", :version => '>=3.1.2', :lib => false
config.gem "rr", :version => '>=0.9'
config.gem "thoughtbot-factory_girl", :version => '>=1.2.1', :lib => "factory_girl", :source => "http://gems.github.com"
config.gem "webrat", :version => ">= 0.4.4"
config.gem "ZenTest", :version => '>=4.0', :lib => false # for autotest
config.gem "autotest-mac", :lib => false