Skip to content

Instantly share code, notes, and snippets.

View theharq's full-sized avatar

Hildebrando Rueda theharq

  • Berlin, Germany
View GitHub Profile
@theharq
theharq / gist:3441120
Created August 23, 2012 20:15
ways to interact with slides with saaspose service
## Convert to PDF
Saaspose::Slides.convert "amigos.ppt", "local_pdf.pdf", {:format=>:pdf, :folder => "slidetown-dev"}
## Save slide 1 to jpeg
url = "slides/amigos.ppt/slides/1"
Saaspose::Utils.call_and_save(url, {:format=>:jpeg, :height=>600, :width=>800, :folder => "slidetown-dev"}, "slide1.jpeg")
@theharq
theharq / gist:3850774
Created October 8, 2012 04:51
fix for the dom load on turbolinks
var do_on_load = function() {
// todo
}
$(document).ready(do_on_load)
$(window).bind('page:load', do_on_load)
@theharq
theharq / .bash_profile
Created October 25, 2012 19:43
my ~/.bash_profile configuration
# Shorting Command Prompt
#################################
export PS1='\W \$ '
# Scripts and application aliases
#################################
alias gs='git status'
@theharq
theharq / sublime-settings
Last active October 12, 2015 07:48
Sublime Text Personal Settings
{
"binary_file_patterns":
[
"*.jpg",
"*.jpeg",
"*.png",
"*.gif",
"*.ttf",
"*.tga",
"*.dds",
@theharq
theharq / sublime-keymap
Created November 1, 2012 16:20
Sublime Text key bindings
[
{ "keys": ["super+shift+."], "command": "erb" }
]
require 'spec_helper'
describe City, "Relations" do
it { should belong_to(:state) }
end
describe City, "Validations" do
it { should validate_presence_of(:name) }
it { should validate_presence_of(:state_id) }
end
@theharq
theharq / harq.plugin.zsh
Last active October 13, 2015 00:58
harq plugin for ohh my zshh
# Scripts and application aliases
#################################
alias gs='git status'
alias gpr='git pull --rebase'
alias rpow='touch ~/.pow/restart.txt'
alias tlog='tail -f log/development.log'
alias t='bin/rake test'
alias amend="git commit --amend"
alias fs='foreman start'
@theharq
theharq / reverse_geocoding.js
Created December 28, 2012 17:15
reverse geocoding with google maps V3
var myLocation = new google.maps.LatLng(myLatitude, myLongitude);
var geocoder = new google.maps.Geocoder();
geocoder.geocode({'latLng': myLocation}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
if (results) {
console.log(results[0].formatted_address);
}
} else {
alert("Geocoder failed due to: " + status);
@theharq
theharq / Gemfile
Last active December 15, 2015 04:38 — forked from nathancolgate/Gemfile
ice_cube gem example
# Add these two gems
gem 'ice_cube', '0.9.3'
gem 'squeel', '1.0.16'
@theharq
theharq / getband.rb
Created May 7, 2013 19:27
getband methods
##########
# GETBAND
##########
Band.update_all("city_id = 110")
c = Creation.new(:body => 'http://www.youtube.com/watch?v=WdsGihou8J4')
c = Creation.new(:body => 'http://www.vimeo.com/3300155')
c = Creation.new(:body => 'http://www.soundcloud.com/forss/flickermood')
include AutoHtml
result = auto_html('http://www.soundcloud.com/forss/flickermood') { soundcloud }