Copy entire database into another one
mysqldump -u [user] -p[pass] [source_db] | mysql -u [user] -p[pass] [target_db]
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
# Install vmware x11 video driver | |
emerge -va x11-drivers/xf86-video-vmware |
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 you need to set mouse sensitivity on X or gnome3 to value lower than the | |
# mouse configuration utility provides, this is the script for you. | |
# script built for fedora 17, but it should work for some other distros as well. | |
echo -e "\ncheck the 'id' of you mouse device ...\n" | |
xinput | |
echo "---- ---- ---- ----" |
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
# basic makefile for c++ project | |
SOURCE=main.cpp your_include.h | |
MYPROGRAM=shellgap | |
MYINCLUDES= | |
MYLIBRARIES= | |
CC=g++ | |
#------------------------------------------------------------------------------ |
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
/* | |
* @link http://stackoverflow.com/questions/13600934/why-is-the-virtual-keyword-needed | |
* @author Alan Johnson | |
* > Hi, | |
* > | |
* > Can someone explain to me what static and dynamic dispatch are and what | |
* > the difference is between the two? Do this even occurr in C++? | |
* > | |
* > Thanks | |
* |
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
wget -O data.xml --auth-no-challenge --user=<username> --password=<password> https://my.api.url.com/apiDownloadFile |
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
# Generic Makefile for compiling an executable, with pkg-config dependencies. | |
CC := clang | |
PKGS := gtk+-3.0 | |
SRCDIR := src | |
BUILDDIR := build | |
CFLAGS := -g -Wall `pkg-config --cflags $(PKGS)` | |
LIBS := `pkg-config --libs $(PKGS)` | |
TARGET := app |
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 | |
sudo yum install gcc make php-devel geoip geoip-devel | |
sudo pecl install geoip | |
ls /usr/lib64/php/modules/geoip.so | |
echo -e "; Enable geoip extension module\nextension=geoip.so\n" >> /etc/php.d/geoip.ini | |
echo -e "Done installing GeoIP PHP extention!\n" |
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 | |
# Export databases first with the following command: | |
# mysqldump -u user -p db-name > db-name.dbd | |
# Configure your new database | |
file_ext=".dbd" | |
db_user="root" | |
db_pass="myrootpassword" |