This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
angular.module('ui.bootstrap.tabsleft', ["template/tabs/tabset-left.html","template/tabs/tab-left.html"]) | |
.controller('TabsetLeftController', ['$scope', function TabsetLeftCtrl($scope) { | |
var ctrl = this, | |
tabs = ctrl.tabs = $scope.tabs = []; | |
ctrl.select = function(selectedTab) { | |
angular.forEach(tabs, function(tab) { | |
if (tab.active && tab !== selectedTab) { | |
tab.active = false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! | |
* angular-loading-bar v0.7.1 | |
* https://chieffancypants.github.io/angular-loading-bar | |
* Copyright (c) 2015 Wes Cruver | |
* License: MIT | |
*/ | |
/* | |
* angular-loading-bar | |
* | |
* intercepts XHR requests and creates a loading bar. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Trouver les doublons dans une table : | |
SELECT app_id, ville_cp FROM appellation_zone GROUP BY app_id, ville_cp HAVING COUNT(*) > 1; | |
Puis créer un index Unique avec les 2 colonnes pour que ça ne se reproduise pas ! | |
Réindexer une table (si l'on veut les id commencent à 1 ou que l'on veut des id qui se suivent sans 'trous') | |
# 1. Copier table | |
# 2. Supprimer clé primaire auto incrément | |
ALTER TABLE test DROP COLUMN id) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Empty a file / Vider un fichier | |
cat /dev/null > myfile.txt | |
# Recherche texte dans les fichiers d'un répertoire : | |
find /arborescence -type f -exec grep -H 'chaine' {} \; | |
# Recherche du nom d'un fichier : | |
find /home/hugo/ -name *.mo | |
# Rechercher les fichiers de plus de 100Mo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create repo on your server | |
cd /var/www/website | |
git init | |
git config user.email your@name.com | |
git config user.name Your Name | |
git remote add origin git@github.com:GitUser/repo.git | |
# GIT HOW TO UNWATCH SOME FILES (logs, config ...) | |
# http://stackoverflow.com/questions/9794931/keep-file-in-a-git-repo-but-dont-track-changes | |
# First change the file you do not want to be tracked and use the following command: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bower cache clean | |
bower update | |
# Publish a package | |
bower init | |
bower register <package-name> git://github.com/<git-user>/<git-repo>.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GULP | |
http://paislee.io/a-healthy-gulp-setup-for-angularjs-projects/ | |
https://github.com/paislee/healthy-gulp-angular/blob/master/gulpfile.js | |
https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md | |
https://github.com/gulpjs/gulp | |
http://www.alsacreations.com/tuto/lire/1685-ebauche-de-workflow-gulp-taches-uncss-includes-critical-css.html | |
https://www.npmjs.com/package/gulp-html-replace | |
https://github.com/jonkemp/gulp-useref | |
https://github.com/nlundquist/gulp-replace-build-block/blob/master/readme.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteCond %{HTTP_HOST} ^ | |
RewriteRule (.*) http://www./$1 [R=301,L] | |
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/ | |
RewriteRule ^index\.php$ http://www./ [R=301,L] | |
/var/www/maugey.fr/code | |
http://shop.alterlinks.com/htpasswd/passwd.php | |
// Placer le .htaccess dans le répertoire à protéger : | |
#AuthUserFile /var/www/wine-trip.yo/app/.htpasswd | |
AuthUserFile /homez.534/maugey/www | |
AuthGroupFile /dev/null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
ini_set('display_errors', 1); | |
ini_set('error_reporting', E_ALL); | |
/* permet d'aficher le contenu d'une page au fur et à mesure ... très bon pour le dev ou quand on veut suivre un process */ | |
header( 'Content-Encoding: none; ' );//disable apache compressed | |
@ini_set('zlib.output_compression', 0); | |
@ini_set('implicit_flush', 1); | |
ob_implicit_flush(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Traduction (PoEdit) | |
1. Créer la liste des fichiers contenant des chaînes à traduire : | |
find -name *.php > fichiersatraduire.txt | |
2. Créer le fichier .pot contenant toutes les chaînes à traduire trouvées dans les fichiers contenu dans fichiersatraduire.txt | |
xgettext -f fichiersatraduire.txt -o wine-trip.pot --from-code utf-8 | |
3. Dans PoEdit : |
OlderNewer