This file contains hidden or 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
| php -i | grep 'Configuration File' |
This file contains hidden or 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
| function($) { | |
| // Execute when page is loaded | |
| $(function() { | |
| }); | |
| })(jQuery); |
This file contains hidden or 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
| #Get sudo user | |
| sudo -s | |
| #List iptables | |
| iptables -L -n | |
| #Remove the desired ip | |
| iptables -D fail2ban-ssh -s banned_ip -j DROP |
This file contains hidden or 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
| :1,$d |
This file contains hidden or 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
| # Disable | |
| defaults write com.apple.dashboard mcx-disabled -boolean YES | |
| killall Dock | |
| # Enable | |
| defaults write com.apple.dashboard mcx-disabled -boolean NO | |
| killall Dock |
This file contains hidden or 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
| backup: # mysqldump -u root -p[root_password] [database_name] > dumpfilename.sql | |
| restore:# mysql -u root -p[root_password] [database_name] < dumpfilename.sql |
This file contains hidden or 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
| cd /path_to_drupal_installation | |
| chown -R www-data:www-data . | |
| find . -type d -exec chmod u=rwx,g=rx,o=rx {} \; | |
| find . -type f -exec chmod u=rw,g=r,o=r {} \; |
This file contains hidden or 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
| #Git - force a pull to overwrite everything, on every pull | |
| git fetch origin master | |
| git reset --hard FETCH_HEAD | |
| git clean -df |
This file contains hidden or 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
| defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' |
This file contains hidden or 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
| Route::filter('role', function() | |
| { | |
| if(Auth::user()->role != 'admin') { | |
| return Redirect::to('home'); | |
| } | |
| }); | |
| Route::get('protectedPage1', array('before'=>'role', function() { | |
| // do your job | |
| })); |