Skip to content

Instantly share code, notes, and snippets.

View lambda2's full-sized avatar
🌴

André Aubin lambda2

🌴
View GitHub Profile
@lambda2
lambda2 / preferences.sublime-settings
Created December 14, 2014 00:36
preferences.sublime-settings
{
"font_size": 12.0,
"ignored_packages":
[
"Vintage"
],
"rulers":
[
80
],
@lambda2
lambda2 / after.json
Created July 4, 2015 14:08
Modifications d'API pour la v1.4.2 user#show
{
"id": 14367,
"login": "adent",
"email": "[email protected]",
"alias": [
"[email protected]",
"[email protected]",
"[email protected]"
],
"display_name": "Arthur Dent",
@lambda2
lambda2 / pizza.md
Created July 12, 2015 18:49
liste pizzas

Bobol

Reine en L Pates bolognaise

Laurie

Bankok en M

Mathieu

@lambda2
lambda2 / Debian 7.8.md
Last active September 22, 2015 15:22 — forked from ChuckJHardy/digital_ocean_setup.md
Debian 7.8 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3 Setup Instructions

Debian 7.8 + Rails 4 + Nginx + Unicorn + PostgreSQL + Capistrano 3

SSH into Root

Change Root Password

$ passwd

The ProjectsUser represents the subscription of an user on a project. A subscribed user can have one or more teams based on his number of attempts to this project. Be careful to always select the active team (the last team).

Here is basically the different states a user can have on a project:

  • He (the user) has't any projects_user, he is not registered on the project.
  • He has no team, he is actually searching a group, in order to make one.
  • He has a team, wich is not locked (the locked_at field is not null), he is creating a group.

If the user have a locked team, he did, or he is doing the project. At this point, the available states are:

  • His team is closed and has a final_mark (the locked_at, closed_at and final_mark fields aren't null), he has finished his project. If he don't have a final_mark yet, he his waiting for correction.
@lambda2
lambda2 / README.md
Created January 27, 2016 15:30 — forked from jherdman/README.md
A Gem loading benchmark script

Benchmark Bundler

Because loading gems can take longer than you think

$ curl -fsSL https://gist.github.com/jherdman/5025684/raw/a3ccd4b5308723245706b4ae315845fe951b4473/benchmark.rb | ruby
............................................................[DONE]

Gem                            Time(sec)     Pct %
--------------------------------------------------
@lambda2
lambda2 / CHANGELOG.md
Last active February 24, 2016 13:55
Api 2.1 changelog

API changelog (2.1)

Routes removal

Some routes has been removed, the data is always accessible, but by an other way.

  • GET /v2/projects/:project_id/projects_users
  • POST /v2/users/:user_id/notes
  • GET /v2/users/:user_id/notes/:id
@lambda2
lambda2 / evil_bot.rb
Created May 20, 2016 00:19
A twitter bot, here designed to work with some active record models, but the logic is there.
require 'twitter'
require 'logger'
# 🐵 patch search results, because they sucks
module Twitter
class SearchResults
attr_reader :rate_limit
@lambda2
lambda2 / bonjourmadame.rb
Last active June 23, 2016 09:18
Redirect all bonjour* tumblr posts to a slack channel
require "tumblr_client"
require 'slack-ruby-client'
POST_DELAY = 30.minutes
SLACK_CHANNEL = '#nsfw'
# bonjourmademoiselle.fr dites.bonjourmadame.fr bonjourlesfesses.tumblr.com
TUMBLR_SOURCE = 'bonjourmademoiselle.fr'
PAGE_LENGTH = 20
@lambda2
lambda2 / punchlines.json
Created June 25, 2016 13:23
A JSON file of punchline of various french artists
[
{
"content": "« Je suis venu comme un roi, je pars comme une légende. »",
"tags": [
"Ego Trip",
"Foot",
"Sport"
],
"author": "Zlatan Ibrahimović",
"album": "",