Skip to content

Instantly share code, notes, and snippets.

View ys's full-sized avatar
💭
Doing stuff with computers

Yannick Schutz ys

💭
Doing stuff with computers
View GitHub Profile
Ruby 2.1.0 in Production: known bugs and patches
Last week, we upgraded the github.com rails app to ruby 2.1.0 in production.
While testing the new build for rollout, we ran into a number of bugs. Most of
these have been fixed on trunk already, but I've documented them below to help
anyone else who might be testing ruby 2.1 in production.
@naruse I think we should backport these patches to the ruby_2_1 branch and
release 2.1.1 sooner rather than later, as some of the bugs are quite critical.
I'm happy to offer any assistance I can to expedite this process.
@sferik
sferik / and_or.rb
Last active December 31, 2015 14:49
class BasicObject
def &&(other)
other
end
def ||(other)
self
end
end
@thbar
thbar / readme.md
Last active December 31, 2015 03:29
Get an error to make sure you review Rails changes.

When applying Rails upgrades on WiseCash, I want to make sure I review the commits to spot potential regressions. This RSpec spec warns me when I'm upgrading at any time (even tired, where you might forgot to do so).

#!/bin/sh
# Setup some variables needed for bootstrapping the environment
ROOT=/home/vrde/projectz/myproject
REPOS=${ROOT}/repos
export PYTHONPATH=${REPOS}

Your Vision

What is a vision?

Your vision answers the question "What do I want?" A clear vision help you communicate why you're here and what impact you're going to have.

Your vision should be aligned with the company vision, with your manager's V2MOM, and it should be personal. It should be an honest reflection of your own vision for your own work.

If you manage a team, it should be reflective of the purpose of the team and your collective impact.

@thbar
thbar / about.md
Last active December 22, 2015 21:39
A rake task to create a new jekyll post (with title, slug, date pre-filled)

Here is the little rake task I use to create new posts for the WiseCash jekyll-based blog.

To use, just run:

rake blog:new["Your Blog Post Title"]
@maxim
maxim / rails_load_path_tips.md
Last active April 13, 2023 13:28
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

@maccman
maccman / counter.sql
Created July 7, 2013 03:11
Postgres counter cache using triggers.
--
-- Name: c_posts_voted(); Type: FUNCTION; Schema: public; Owner: -
--
CREATE FUNCTION c_posts_voted() RETURNS trigger
LANGUAGE plpgsql
AS $$ BEGIN
UPDATE "posts" SET voted_user_ids = array_append(voted_user_ids, NEW.user_id) WHERE "id" = NEW.post_id;
RETURN NEW;
END;
@jlecour
jlecour / conseils_presentation.md
Last active December 18, 2015 16:39
J'ai sollicité mes followers Twitter pour quelques conseils., voilà les réponses que j'ai reçues.

J'ai sollicité mes followers Twitter pour quelques conseils.

jlecour: Couper les notifications, fermer les apps, cacher le bureau, … D'autres astuces de dernière minute pour présentation lors d'une conf ?

Voici les réponses (toutes utiles) que j'ai reçues :

  • gbougeard: avoir tous les cables possibles, des backups
  • olg: compte complètement séparé.
  • eric030: vider l'historique si tu dois te servir de ton navigateur :)
  • madx: respirer un grand coup et se destresser