Skip to content

Instantly share code, notes, and snippets.

View themouette's full-sized avatar
🍎

Julien MUETTON themouette

🍎
View GitHub Profile
@themouette
themouette / backup-owncloud-local.sh
Last active March 30, 2016 19:07
backup-owncloud
#!/usr/bin/env bash
BACKUP_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
# Log a message.
function log {
echo -e " \033[32m*\033[0m ${1}"
}
# write an error message.
function error {
echo -e "\033[31m${1}\033[0m"
@themouette
themouette / publish.sh
Created November 19, 2014 11:19
Publish script to deploy branch
#!/usr/bin/env bash
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
git checkout -b release && \
grunt release && \
git add -f public && \
git commit -m 'Latest release' && \
git push -f deploy release:master && \
git tag "release-`date +'%F-%s'`"
git checkout "${ORIG_BRANCH}"&& \
@themouette
themouette / install.sh
Last active August 29, 2015 14:08
generic-install-script.sh
#!/usr/bin/env bash
# This is the project root.
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Log a message.
function log {
echo -e " \033[32m*\033[0m ${1}"
}
# write an error message.
@themouette
themouette / install-dev.sh
Last active August 29, 2015 14:06
rails install script for docker
#!/bin/bash
bundle install --deployment --path /var/bundle --without production
if [ ! -e "config/database.yml" ] ; then cp config/database.example.yml config/database.yml; fi
if [ ! -e ".env" ] ; then cp sample.env .env; fi
bundle exec rake db:create
bundle exec rake db:schema:load
bundle exec rake db:migrate
bundle exec rake db:seed
@themouette
themouette / README.markdown
Created October 23, 2013 15:48
Install and test scripts for puppet module.

Install

$ puppet module install my-module

or

$ git clone path-to-repo.git && ./bin/bootstrap.sh
@themouette
themouette / terms.mkd
Last active December 15, 2015 07:09 — forked from clintongormley/terms.mkd

Declare child mapping:

curl -XPUT 'http://localhost:9200/test' -d '{
    "settings": {
        "analysis": {
            "analyzer": {
                "fullfields": {
                    "tokenizer" : "keyword",
                    "filter" : ["lowercase"],

"analyzer": "keyword"

@themouette
themouette / _WebTestCase.php
Last active December 15, 2015 05:49
A base test cases for symfony2 projects with a sqlite dump replacement. Used on a project with huge fixtures, sqlite file copy is the fastest that could be done. sh generate sqlite dump from mysql. WARNING: table fields order is important for conversion.
<?php
namespace Vendor\ApplicationBundle\Tests\Utils;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseTestCase;
class WebTestCase extends BaseTestCase
{
protected $databaseResetedOnce = false;
@themouette
themouette / 0_README.md
Last active December 15, 2015 05:29
boilerplate for grunt + foundation + backbone + requirejs