Skip to content

Instantly share code, notes, and snippets.

View micaelbergeron's full-sized avatar

Micaël Bergeron micaelbergeron

View GitHub Profile
class ApplicationController < ActionController::Base
...
# FORCE to implement content_for in controller
def view_context
super.tap do |view|
(@_content_for || {}).each do |name,content|
view.content_for name, content
end
end
end
public void saveJoueur(Joueur joueur)
{
List<Joueur> equipe = new List<Joueur>();
List<Joueur> equipeTemp = new List<Joueur>();
equipe = lectureJoueurs();
foreach (Joueur j in equipe)
{
if (joueur.isCapitain && j.isCapitain)
@micaelbergeron
micaelbergeron / 0_reuse_code.js
Last active August 29, 2015 14:20
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
static void Main(string[] args)
{
const char VIDE = '_';
try
{
System.IO.StreamReader sr = new System.IO.StreamReader(@"C:\Users\Michael\Desktop\School\Pendu.txt");
string line;
while ((line = sr.ReadLine()) != null)
{