Skip to content

Instantly share code, notes, and snippets.

@Awea
Awea / demo.html
Created February 10, 2012 09:40
Make html select referenceable
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Select Ref 2</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" language="Javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script>
<script type="text/javascript" language="javascript" src="selectref.js"></script>
</head>
<body>
<div style="width:457px;background-color:orange;margin:auto;padding:auto;height:50px;padding:7px;text-align:center;">
@Awea
Awea / devise.fr.yml
Created February 24, 2012 10:35 — forked from floutchito/devise.fr.yml
I18n French translation for Devise (http://github.com/plataformatec/devise)
#########################################################################################################
# I18n French translation for Devise (http://github.com/plataformatec/devise)
# I18n traduction française pour Devise
#########################################################################################################
fr:
errors:
messages:
expired: "a expiré, merci d'en demander un(e) autre"
not_found: "n'a pas été trouvé(e)"
@Awea
Awea / mdv.rb
Created June 9, 2012 09:55 — forked from mvz/mdv.rb
Dead-simple Markdown Viewer
#!/usr/bin/env ruby
require 'ffi-gtk3'
require 'github/markup'
GirFFI.setup :WebKit, '3.0'
Gtk.init
WebKit.set_cache_model :document_viewer
@Awea
Awea / bonjourgem-suggestions.txt
Created June 13, 2012 10:01 — forked from msadouni/bonjourgem-suggestions.txt
Gems suggestions for BonjourGem.com
rails_admin
bullet
sidekiq
devise-async
display-case
decent_exposure
virtus
wicked
apartment
yell
@Awea
Awea / nova.html
Created June 14, 2012 08:36
Nova HTML5 - Player
<audio controls preload>
<source src="http://broadcast.infomaniak.ch/radionova-high.mp3" />
</audio>
@Awea
Awea / gist:3487157
Created August 27, 2012 10:13
CURL replacement for file_get_contents
function file_get_contents_curl($url) {
$ch = curl_init();
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
curl_setopt($ch, CURLOPT_URL, $url);
$data = curl_exec($ch);
curl_close($ch);
@Awea
Awea / wrapper.js
Created September 25, 2012 13:43 — forked from anonymous/wrapper.js
javascript wrapper
$(document).ready(function(){
// global history
var last_id = new Array;
var state = {};
last_id.push("nothing");
// Add new_id in first element of history (last_id)
function save_my_history(history_list, new_id)
@Awea
Awea / account-error.png
Created October 9, 2012 07:42
issue-files
account-error.png
@Awea
Awea / mc_basics.md
Created October 11, 2012 22:12
Mailchimp basics

Connexion à mailchimp :

https://login.mailchimp.com/

Une fois connecté on arrive sur le Dashbooard.

Depuis celui-ci on accède à plusieurs choses :

Create A List => pour la création de liste

@Awea
Awea / project.rb
Created December 5, 2012 01:11
Scope refactor
class Project < ActiveRecord::Base
# Scopes
scope :current_application, lambda { |application|
joins(:event).
where(["events.application_id = ?", application.id])
}
scope :ordered, lambda {
order('end ASC')
}