Skip to content

Instantly share code, notes, and snippets.

View FredLeg's full-sized avatar

Frédéric FredLeg

  • Paris
View GitHub Profile
@FredLeg
FredLeg / getgits.bash
Last active August 29, 2015 14:25
Clone tous les dépôts de la liste, pour un utilisateur donné, du moment que le dossier n'existe pas déjà sur votre disque.
#!/bin/bash
user='Webforce3'
depos=('jdc-poo' 'cooking' 'smarty' 'image_crop' 'movies' 'admin' 'shop' 'movies.bkp' 'lesjoiesducode' 'wf3collab' 'google_img')
for depo in "${depos[@]}"
do
if [ ! -d ./$depo ]; then
echo
`git clone https://github.com/$user/$depo.git`
fi
done
@FredLeg
FredLeg / gist:545080072c7a3776ee80
Last active August 29, 2015 14:25
Remplacement: $movie['actors'] ---> $movie->actors
$movie['actors'] ---> $movie->actors
Fine what: \$(?!_)([a-zA-Z0-9_]+)\[['"]([a-zA-Z0-9_]+)['"]\]
Replace with: \$$1->$2
@FredLeg
FredLeg / gist:edef57c698a8021b8b8b
Last active August 29, 2015 14:25
Remplacement pour les templates
<?= $root_path ?> ---> {$root_path}
Find what: <\?=\s*(.+)\s*\?>
Replace with: {$1}