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
for i in `gem list --no-versions`; do gem uninstall -aIx $i; done |
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
bundle install --without development test |
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
Okay, spend way too much time on this one. | |
But however, use the following command to install rotatelogs | |
sudo apt-get install apache2-utils | |
By default the binary file is only accessible with superuser priviliges. Move the file to /usr/sbin/. | |
sudo mv /usr/bin/rotatelogs /usr/sbin/ | |
Now you can gracefully start apache2 with custom logs ;) |
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
If your browser downloads the file instead of displaying it? | |
sudo apt-get install libapache2-mod-php5 -y | |
After that enable php for apache | |
a2enmod php5 | |
Restart server | |
sudo service apache2 restart |
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
2.2 configuration: | |
Order deny,allow | |
Deny from all | |
2.4 configuration: | |
Require all denied | |
In this example, all requests are allowed. |
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
From remote to local | |
scp -i '/PATH/TO/YOURPEM.pem' -r USER@PUBLIC_IP:/SPECIFY/PATH/*.ini /PATH/TO/FILES/ | |
From local to remote | |
scp -i '/PATH/TO/YOURPEM.pem' PATH/TO/FILE/YOU/WANT/TO/COPY/* USER@PUBLIC_IP: |
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
memcached -d -m 2048 -M -p 11211 |
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
array.uniq.map { | e | [array.count(e), e] }.select { | c, _ | c > 1 }.sort.reverse.map { | c, e | "#{e}:#{c}" } |
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
script > script_output.txt 2>&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
sudo tcpdump -A -s0 -ien4 port 3306 |
OlderNewer