Skip to content

Instantly share code, notes, and snippets.

🤠
Exploring blockchain technology

Alexandre Bonhomme alexbonhomme

🤠
Exploring blockchain technology
Block or report user

Report or block alexbonhomme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View make-release.sh
#! /bin/bash
if [[ "$#" -lt 1 ]]; then
printf "\033[0;31mUsage: $0 version \e[0m\n"
exit -1
fi
RELEASE_VERSION=$1
BRANCH_NAME="release-$RELEASE_VERSION"
View installation.sh
# Hostname
echo "mnemosyne" | sudo tee /etc/hostname > /dev/null
sudo sed -i 's/raspberrypi/mnemosyne/g' /etc/hosts
# Fix locales
echo "LANG=\"en_GB.UTF-8\"
LC_MESSAGES=\"en_GB.UTF-8\"
LANGUAGE=\"en_GB.UTF-8\"
LC_CTYPE=\"en_GB.UTF-8\"
LC_ALL=\"en_GB.UTF-8\"" | sudo tee /etc/default/locale > /dev/null
View configure.patch
--- configure 2017-09-12 15:15:16.000000000 +0200
+++ configure12 2017-09-12 15:14:41.000000000 +0200
@@ -5005,7 +5005,7 @@
;;
- 9.0)
+ 12.1)
View macosx-install-php-oracle-oci8-pdo_oci.md
@alexbonhomme
alexbonhomme / update_username.sh
Created Jul 20, 2017
Update Github username in local repos
View update_username.sh
# Update and convert old HTTPS sources
find . -path "*/.git/config" -exec sed -i '' -e "s,url = https://github.com/blckshrk,url = git@github.com:alexbonhomme,g" {} \;
# Update SSH sources
find . -path "*/.git/config" -exec sed -i '' -e "s,url = git@github.com:blckshrk,url = git@github.com:alexbonhomme,g" {} \;
# checks
find . -path "*/.git/config" -print0 | xargs -0 grep 'alexbonhomme'
@alexbonhomme
alexbonhomme / post-receive
Created Jul 14, 2016
Push to deploy GIT hook
View post-receive
#!/bin/bash
while read oldrev newrev ref
do
if [[ $ref =~ .*/master$ ]] || [[ $ref =~ .*/develop$ ]];
then
export branch=${ref:11}
echo "$branch received. Deploying $branch branch..."
git --work-tree=/home/user/www --git-dir=/home/user/repo checkout -f $branch
View symfony3_prod.md

Workflow de mise en production pour Symfony 3

Clone du dépot

git clone ...

Vérfier les deps Symfony

php bin/symfony_requirements

Installation deps

@alexbonhomme
alexbonhomme / CreateClientCommand.php
Last active May 5, 2016
Adds command in Symfony2 console to generate OAuth client with given grants.
View CreateClientCommand.php
<?php
/**
* Usage: php app/console acme:oauth-server:client:create --grant-type="password" --grant-type="http://my.custom/grants/access"
*/
namespace AppBundle\Command;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputArgument;
View symfony2_tips.md

Local server

php app/console server:run

php app/console server:stop

Routes list

php app/console debug:router

Send spool emails (SwiftMailer)

php app/console swiftmailer:spool:send --message-limit=10 --env=prod

View shell_tips.sh
# compte le nombre de lignes de tous les fichiers JavaScript de l'arborescence.
wc -l `find . -name "*.js"`
You can’t perform that action at this time.