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
sudo yum update | |
sudo yum groupinstall "Development Tools" | |
sudo yum install kernel-devel kernel-headers |
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
mvn dependency:copy-dependencies -DoutputDirectory=path/to/lib/folder |
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
try to use the -r flag (read-only) | |
# mount -r -o loop file.img /mnt | |
if that doesn't work try: | |
# unsquashfs |
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
#! /bin/bash | |
if [ $# -eq 0 ]; then | |
echo "You have to specify a module index" | |
exit 128 | |
fi | |
pactl unload-module $1 |
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
Easy WordPress Parallax Slider | |
http://wordpress.org/plugins/easy-wp-parallax-slider/ | |
http://demo.oscitasthemes.com/demos/easy-wordpress-parallax-slider/ | |
http://www.velvetinkmedia.com/wp-content/themes/vim/sliders/ | |
http://www.velvetinkmedia.com/wp-content/themes/vim/sliders/parallax/documentation/documentation.html |
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
Problem: Seems like npm (now?) installs node modules to /usr/local/lib/node_modules/ and not /usr/local/lib/node/ | |
Solution: sudo ln -s /usr/local/lib/node_modules/ /usr/local/lib/node | |
OR: | |
Check NODE_PATH: npm root -g | |
You can add the following to ~/.bash_profile: | |
export NODE_PATH=/usr/lib/node_modules:$NODE_PATH |
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
Ref: http://www.nesterovsky-bros.com/weblog/2008/12/04/ASimpleCacheForJavaApplication.aspx | |
Although in last our projects we're using more Java and XSLT, we always compare Java and .NET features. It's not a secret that in most applications we may find cache solutions used to improve performance. Unlike .NET providing a robust cache solution Java doesn't provide anything standard. Of course Java's adept may find a lot of caching frameworks or just to say: "use HashMap (ArrayList etc.) instead", but this is not the same. | |
Think about options for Java: | |
1. Caching frameworks (caching systems). Yes, they do their work. Do it perfectly. Some of them are brought to the state of the art, but there are drawbacks. The crucial one is that for simple data caching one should use a whole framework. This option requires too many efforts to solve a simple problem. | |
2. Collection classes (HashMap, ArrayList etc.) for caching data. This is very straightforward solution, and very productive. Everyone knows these classes, nothin |
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 echo(exec("whoami")); ?> | |
// # chown -R apache_username: wordpress_folder |
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
Here is a very simple way to turn off DEP | |
- Go to START | |
- Type in CMD but do NOT press enter. | |
- Right click the CMD.exe icon and run as Administrator - verify your command prompt says Windows\System32> | |
- Enter this command exactly as shown | |
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
use wp_yourdb; | |
SELECT ID, user_login, user_pass FROM wp_users; | |
UPDATE wp_users SET user_pass = MD5('new_password') WHERE ID=1 LIMIT 1; | |
-- REF: http://www.wpexplorer.com/reset-wordpress-password-using-mysql/ |