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
# Clone repo | |
git clone https://github.com/prerender/prerender.git | |
cd prerender | |
npm install | |
npm install prerender-redis-cache --save | |
# Modifi .htaccess (Middleware in prerender vocabulary | |
https://gist.github.com/thoop/8072354 | |
# Open firewall port |
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
# 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
# List installed packages for current user | |
npm list | |
# List globally installed packages | |
npm list -g | |
# List details about a package | |
npm list PACKAGE_NAME | |
# Show outdated packages | |
npm outdated -g | |
https://www.npmjs.com/package/npm-check | |
https://www.npmjs.com/package/npm-check-updates |
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
# Install | |
sudo pip install supervisor | |
# Copy / Edit /etc/supervisord.conf | |
# http://www.onurguzel.com/supervisord-restarting-and-reloading/ | |
# STOP | |
supervisorctl -c /etc/supervisord.conf stop thruway // all | |
# RESTART | |
supervisorctl -c /etc/supervisord.conf restart all |
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
# https://letsencrypt.org/getting-started/ | |
# clone and run program | |
git clone https://github.com/letsencrypt/letsencrypt | |
cd letsencrypt/ | |
./letsencrypt-auto --help | |
./letsencrypt-auto --verbose --debug | |
./letsencrypt-auto renew --dry-run | |
./letsencrypt-auto renew |
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
# List cron tasks for user www-data | |
sudo crontab -u www-data -l | |
# Edit cron tasks for user www-data | |
sudo crontab -u www-data -e | |
# Backup current user crontab | |
crontab -l > cron-backup.txt | |
# Restore current user crontab | |
crontab cron-backup.txt |
NewerOlder