This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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") | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var do_on_load = function() { | |
// todo | |
} | |
$(document).ready(do_on_load) | |
$(window).bind('page:load', do_on_load) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shorting Command Prompt | |
################################# | |
export PS1='\W \$ ' | |
# Scripts and application aliases | |
################################# | |
alias gs='git status' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"binary_file_patterns": | |
[ | |
"*.jpg", | |
"*.jpeg", | |
"*.png", | |
"*.gif", | |
"*.ttf", | |
"*.tga", | |
"*.dds", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["super+shift+."], "command": "erb" } | |
] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add these two gems | |
gem 'ice_cube', '0.9.3' | |
gem 'squeel', '1.0.16' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# 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 } |
OlderNewer