Skip to content

Instantly share code, notes, and snippets.

@pimpin
pimpin / challenge-2-5.js
Created November 18, 2011 11:09
Proposal for CodeScool's JQuery Air Captain's Logs by Greg Pollack
function viewAlternateFlight(e){
e.preventDefault();
var url = $(this).attr('href');
$.ajax(url, {
type: 'GET',
success: function(result){
$('.seating-chart').html(result);
}
});
@pimpin
pimpin / rencontres.yml
Created March 14, 2012 14:30
Mes exemples de rencontres
- France Italie:
nom: 'France Italie'
visuel: /samples/rencontres/affiche-France_Italie_4fev2012.jpeg
accroche: "Une d\xC3\xA9but de tournois en douceur ?"
description_du_match: |-
<p>Pas &eacute;vident que les italiens nous facilitent le d&eacute;but de la comp&eacute;tition !</p>
<p>Le bapt&egrave;me du feu pour PSA ! Aura-t-il pris les bonnes option pour transcender cette &eacute;quipe remani&eacute;e de nos quasi-champions du monde ??</p>
description_de_la_prestation: |-
<div style="font: normal normal normal 12px/1.5em 'Lucida Grande', Helvetica, Arial, sans-serif; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; padding-top: 0.5% !important; padding-right: 5px !important; padding-bottom: 0.5% !important; padding-left: 5px !important; height: 94% !important; margin: 0px !important;">
<p>Grande journ&eacute;e de lancement &agrave; l'occasion de la premi&egrave;re journ&eacute;e des 6 NATIONS.</p>
@pimpin
pimpin / rencontres.yml
Created March 14, 2012 14:31
Mon modele de Rencontre
description: "Rassemblements f\xC3\xA9minins organis\xC3\xA9s par NRAF"
name: rencontres
order_by: date # c'est le nom de mon field
order_direction: asc
slug: rencontres
highlighted_field_name: nom
public_submission_enabled: false
fields:
- nom:
type: string
{% extends index %}
{% block content %}
{% include 'rencontres_trois_colonnes' %}
{% endblock %}
.one
<!-- COLUMNS CONTAINER STARTS-->
.inner-pages
.page-title
%h3 {{ page.title }}
%h5 {% editable_short_text 'subtitle' %} Demandez-le programme !{% endeditable_short_text %}
#portfolio
#columns.portfolio-container
%ul
@pimpin
pimpin / Gemfile
Created March 15, 2012 11:01
Off a locomotive engine 2.0.0rc2
source 'https://rubygems.org'
gem 'rails', '3.2.1'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'locomotive_cms', '~> 2.0.0.rc2', :require => 'locomotive/engine', :git => 'git://github.com/locomotivecms/engine.git', :branch => '2.0.0.rc' #, :ref => ''
@pimpin
pimpin / mongoid.yml
Created March 15, 2012 21:28
Le bon fichier
defaults: &defaults
host: localhost
port: 27017
# slaves:
# - host: slave1.local
# port: 27018
# - host: slave2.local
# port: 27019
development:
@pimpin
pimpin / gist:2050531
Created March 16, 2012 15:26
Cherche bidouille pour que compass fonctionne avec run et push
# Please, be careful when editing these settings, it may break the theme assets API push
project_path = '/Users/Merlinp/Documents/dev/locomotivecms/nraf/site/public'
http_path = '/'
# change for using locomotive editor push or run function
# for run
css_dir = 'stylesheets'
# # for push
# css_dir = '../tmp/stylesheets'
@pimpin
pimpin / chef_solo_bootstrap.sh
Last active January 4, 2016 19:19 — forked from Wallsays/bootstrap.sh
Bootstrap Ruby & Chef Solo for Ubuntu 12.04 LTS 64 bit with the command `curl -l https://gist.github.com/pimpin/8666161/raw/f5e67635a68197f24b00f235bf6ea2caead608e6/chef_solo_bootstrap.sh | bash`
#!/usr/bin/env bash
sudo apt-get -y update
# Install dependencies
sudo apt-get -y install build-essential zlib1g-dev libssl-dev libreadline-dev libyaml-dev
# Install Ruby 1.9.3 from source
sudo wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz
sudo tar -xvzf ruby-1.9.3-p194.tar.gz
cd ruby-1.9.3-p194/
sudo ./configure --prefix=/usr/local
@pimpin
pimpin / have_xml.rb
Last active November 30, 2022 17:37 — forked from faun/have_xml.rb
require 'nokogiri'
RSpec::Matchers.define :have_xml do |xpath, text|
match do |body|
doc = Nokogiri::XML::Document.parse(body)
nodes = doc.xpath(xpath)
expect(nodes).to_not be_empty
if text
nodes.each do |node|
cdata = node.children.find { |e| e.cdata? }
value_to_check = node.text