I hereby claim:
- I am sylvaincombes on github.
- I am sylvaincombes (https://keybase.io/sylvaincombes) on keybase.
- I have a public key ASCWLu-veKq9Kc4RZuBz3i8-m5PhA8ASQzyZT2DMpsH2xAo
To claim this, I am signing this object:
sudo apt-get install dnsmasq; | |
sudo nano /etc/dnsmasq.conf; | |
# Add the content showed below ( dnsmasq.conf ) | |
sudo apt-get install resolvconf; | |
sudo nano /etc/resolvconf/resolv.conf.d/base; | |
# Add the content showed below ( base ) | |
# now all whatever.localhost should resole to your localhost |
# Generate alter table queries for charset and collation changes - change $DBNAME$ / $CHARSET$ / $COLLATION$ | |
# Tables | |
SELECT CONCAT('ALTER TABLE ', table_name, ' CHARACTER SET $CHARSET$ COLLATE $COLLATION$;') | |
FROM information_schema.TABLES AS T, information_schema.`COLLATION_CHARACTER_SET_APPLICABILITY` AS C | |
WHERE C.collation_name = T.table_collation | |
AND T.table_schema = '$DBNAME$' | |
AND | |
( | |
C.CHARACTER_SET_NAME != '$CHARSET$' |
#!/usr/bin/env bash | |
git fetch --all # read distant git datas | |
git checkout origin/master -- composer.lock # get only the composer.lock file from origin/master | |
# [do your things] | |
git reset HEAD composer.lock # cancel operations on composer.lock file | |
git checkout composer.lock # reset composer.lock file to the previous state (back to a clean git status) |
# One liner style | |
# find all directory with name "*myDirectoryCommonName*", go in the directory, launch commands, repeat | |
for D in `find . -maxdepth 1 -type d | grep myDirectoryCommonName`; do cd "${D}" && git pull && ./app/bin/2017-06-migration.sh && cd ..; done |
#!/usr/bin/env bash | |
usage=" | |
script to convert MySQL/MariaDB charset and collation on one database, all tables and columns | |
/!\ Use at your own risk, data loss can occur ! | |
USAGE | |
$(basename "$0") [options] [action] db_name db_user db_password |
I hereby claim:
To claim this, I am signing this object:
brew install selenium-server-standalone chromedriver geckodriver; | |
selenium-server -port 4444; |
<IfVersion >= 2.4> | |
<If "%{HTTP_HOST} == 'recette.myproject.company.com'"> | |
AuthName "My project" | |
AuthType Basic | |
AuthUserFile "/home/www/recette.myproject.company.com/.htpasswd" | |
Require valid-user | |
</If> | |
</IfVersion> |
ivory_ck_editor: | |
configs: | |
default: | |
# ... | |
# protect twig syntax | |
entities: false | |
protectedSource: ["/\{\{[\s\S]*?\}\}/g", "/\{\%%[\s\S]*?\%%\}/g", "/\{\#[\s\S]*?\#\}/g"] | |
# @see http://ckeditor.com/addon/showprotected for a plugin with a visual indicator / editor of protected source if needed |
<script type="text/javascript"> | |
// Allow and preserve twig syntax @see http://stackoverflow.com/questions/20977910/editing-twig-templates-in-ckeditor | |
// Can also be coupled with this plugin : http://ckeditor.com/addon/showprotected | |
CKEDITOR.config.protectedSource.push(/\{\{[\s\S]*?\}\}/g); | |
CKEDITOR.config.protectedSource.push(/\{\%[\s\S]*?%\}/g); | |
CKEDITOR.config.protectedSource.push(/\{\#[\s\S]*?#\}/g); | |
</script> |