Skip to content

Instantly share code, notes, and snippets.

View pablomarti's full-sized avatar
🧙‍♂️
💻

Pablo Martí pablomarti

🧙‍♂️
💻
View GitHub Profile
https://vimeo.com/channels/natureofcode/58388167
https://vimeo.com/channels/natureofcode/58391447
https://vimeo.com/channels/natureofcode/58400734
https://vimeo.com/channels/natureofcode/58489018
https://vimeo.com/channels/natureofcode/58490313
https://vimeo.com/channels/natureofcode/58492076
https://vimeo.com/channels/natureofcode/58734251
https://vimeo.com/channels/natureofcode/58943395
https://vimeo.com/channels/natureofcode/58943394
https://vimeo.com/channels/natureofcode/58943396
@ramayac
ramayac / vimeo-channel-pages.js
Last active December 17, 2015 20:29
"One liner" para obtener la lista de videos de la p'agina que estas viendo en Vimeo.
document.querySelectorAll("li a[title]").forEach(function(entry){ console.log(entry.href); });
@johnantoni
johnantoni / schema.xml
Last active October 16, 2018 18:09
sunspot solr on a linode vps
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@markbates
markbates / gist:4240848
Created December 8, 2012 16:06
Getting Started with Rack

If you're writing web applications with Ruby there comes a time when you might need something a lot simpler, or even faster, than Ruby on Rails or the Sinatra micro-framework. Enter Rack.

Rack describes itself as follows:

Rack provides a minimal interface between webservers supporting Ruby and Ruby frameworks.

Before Rack came along Ruby web frameworks all implemented their own interfaces, which made it incredibly difficult to write web servers for them, or to share code between two different frameworks. Now almost all Ruby web frameworks implement Rack, including Rails and Sinatra, meaning that these applications can now behave in a similar fashion to one another.

At it's core Rack provides a great set of tools to allow you to build the most simple web application or interface you can. Rack applications can be written in a single line of code. But we're getting ahead of ourselves a bit.

@tony4d
tony4d / p4merge4git.md
Created August 24, 2012 19:00
Setup p4merge as a visual diff and merge tool for git
@rwilcox
rwilcox / capistrano_rvm_and_gemsets.html
Created May 25, 2012 14:48
Capistrano, system wide RVM and creating gemsets
<h1>Introduction to the Problem</h1>
Capistrano is the standard way to deploy Rails apps. Yesterday I was using Capistrano to deploy to a machine where I had installed RVM (Ruby Version Manager) at the system level.
I manually set up Ruby 1.8.7 and Ruby 1.9.2, because I need to run two applications on that machine (one a Ruby 1.8.7 app and one a Ruby 1.9.2 app). Using RVM for production deploys is great for this.
My <code>cap deploy:setup</code> task, however, complained that Ruby 1.9.2 wasn't installed on the machine.
<em>That's funny, because I did install it</em>, I thought. After banging my head up against the problem for a few hours, I finally posted the question to Stackoverflow.com: (<a href="http://stackoverflow.com/questions/6949014/capistrano-deploying-to-system-wide-rvm-not-seeing-installed-rubies">Capistrano deploying to system wide RVM not seeing installed Rubies</a>)
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "[email protected]"
@jrochkind
jrochkind / gist:2161449
Created March 22, 2012 18:40
A Capistrano Rails Guide

A Capistrano Rails Guide

by Jonathan Rochkind, http://bibwild.wordpress.com

why cap?

Capistrano automates pushing out a new version of your application to a deployment location.

I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".

@doitian
doitian / solr_cap.rb
Created February 11, 2012 02:17
sunspot solr in capistrano
namespace :deploy do
task :setup_solr_data_dir do
run "mkdir -p #{shared_path}/solr/data"
end
end
namespace :solr do
desc "start solr"
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RAILS_ENV=#{rails_env} bundle exec sunspot-solr start --port=8983 --data-directory=#{shared_path}/solr/data --pid-dir=#{shared_path}/pids"
@interface UIImage (fixOrientation)
- (UIImage *)fixOrientation;
@end