Skip to content

Instantly share code, notes, and snippets.

View jclaveau's full-sized avatar

Jean Claveau jclaveau

  • Freelancer
  • Paris
View GitHub Profile
$this->attachBehavior('behaviors.StatsProvider');
$globalStats = $this->getGlobalStatsByUser(4);
$graphStats = $this->getGraphStatsByUser(4);
$ranking = Ranking::getGeneralRanking(4);
$achvievements = Achievement::getUserAchievements(4);
$achvievementsProgress
= Achievement::computeUserAchievementsProgress($achvievements);
{
index: "mediaevents_10-09-2016,mediaevents_11-09-2016,mediaevents_12-09-2016",
ignore_unavailable: true,
body: {
query: {
constant_score: {
filter: {
bool: {
must: [
{
@jclaveau
jclaveau / pre-commit
Last active December 13, 2022 10:13
Replace all variables between brackets like "{{ remote.origin.url }}" by their values retrieved from git
#!/bin/sh
# https://www.viget.com/articles/two-ways-to-share-git-hooks-with-your-team/
# git config core.hooksPath .githooks
# run from the root of the repo
.githooks/replace_by_git_vars.py readme.md README.md
# If your filesystem is not case-sensitive you can use
# .githooks/replace_by_git_vars.py README.template.md README.md