Skip to content

Instantly share code, notes, and snippets.

View matiasmasca's full-sized avatar
🏠
Moving to Gitlab.com

Matías Mascazzini matiasmasca

🏠
Moving to Gitlab.com
View GitHub Profile
@steveclarke
steveclarke / capybara.md
Created April 10, 2012 17:32
RSpec Matchers

Capybara

save_and_open_page

Matchers

have_button(locator)
@sherbondy
sherbondy / facebook.js
Created June 2, 2012 01:28
externs for clojurescript
var FB = {};
FB.api = function(location, callback){};
FB.getLoginStatus = function(callback){};
FB.init = function(options){};
FB.login = function(callback, scope){};
FB.logout = function(callback){};
FB.Event = {};
FB.Event.subscribe = function(evt, callback){};
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 14, 2025 16:18
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@alimd
alimd / gist:3344523
Created August 13, 2012 22:28
All github Emoji (Smiles)

All github Emoji (Smiles)

ali.md/emoji

:bowtie: | 😄 | 😆 | 😊 | 😃 | ☺️ | 😏 | 😍 | 😘 | :kissing_face: | 😳 | 😌 | 😆 | 😁 | 😉 | :wink2: | 👅 | 😒 | 😅 | 😓

😩 | 😔 | 😞 | 😖 | 😨 | 😰 | 😣 | 😢 | 😭 | 😂 | 😲 | 😱 | :neckbeard: | 😫 | 😠 | 😡 | 😤 | 😪 | 😋 | 😷

😎 | 😵 | 👿 | 😈 | 😐 | 😶 | 😇 | 👽 | 💛 | 💙 | 💜 | ❤️ | 💚 | 💔 | 💓 | 💗 | 💕 | 💞 | 💘 | ✨

@rstacruz
rstacruz / models.md
Created October 11, 2012 06:17
Rails models

title: Rails Models

Generating models

$ rails g model User

Associations

belongs_to

@GusGA
GusGA / ruby_job_interview_questions_es.md
Last active August 4, 2020 13:01
Posibles preguntas de una entrevista de trabajo para Ruby y Ruby on Rails
  1. ¿Qué es request.xhr?
  2. ¿Cuál es la diferencia entre un Scaffolding dinámico y estático?
  3. ¿Cuál es la diferencia entre Symbol y String? Symbol es inmutable y no puede ser modificado a diferencia de un String
  4. ¿Qué es una sesión y una cookie?
  5. ¿Por qué Ruby on Rails?
  6. ¿Qué es MVC y cómo funciona?
  7. ¿Qué cosas puedes definir en el modelo?
  8. ¿Qué es ORM en Rails?
  9. ¿Cuántos tipos de relaciones tiene un modelo?
@kizzx2
kizzx2 / post.rb
Last active June 26, 2021 12:14
A clean and elegant approach to partial object validation with Rails + Wicked wizards (using session to store the partial object)
class Post < ActiveRecord::Base
attr_accessible :body, :price, :title
validates_presence_of :title
validates_length_of :title, minimum: 10
validates_presence_of :body
validates_numericality_of :price, greater_than: 0
end
@internoma
internoma / datos.json
Created May 20, 2013 18:54
Leer base de datos JSON desde archivo datos.json
{
"videos": [
{
"Titulo": "RESPONSIVE WEB DESIGN CON BOOTSTRAP",
"Tiempo": "01:07:20",
"Final": "si"
},
{
"Titulo": "Presentación",
"Tiempo": "00:03:20",
@jonah-williams
jonah-williams / circle.yml
Last active May 29, 2019 14:53
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300
@tomas-stefano
tomas-stefano / Capybara.md
Last active July 2, 2025 01:57
Capybara cheatsheet

Capybara Actions

# Anchor
click_link 'Save'

# Button
click_button 'awesome'

# Both above