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
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
/* | |
* @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
# 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
#!/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
# 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
Section "ServerLayout" | |
Identifier "X.org Configured" | |
Screen 0 "Screen0" 0 0 | |
EndSection | |
Section "Files" | |
ModulePath "/usr/lib/xorg/modules" | |
FontPath "/usr/share/fonts/misc/" | |
FontPath "/usr/share/fonts/TTF/" | |
FontPath "/usr/share/fonts/OTF" |
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 | |
# This is my compile command | |
# works good for me with PHP 5.3/5.4 | |
# You might need this packages too (CentOS 5/6 tested) | |
#sudo yum install libxml2-devel.x86_64 | |
#sudo yum install httpd-devel.x86_64 | |
#sudo yum install openssl-devel.x86_64 |
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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Plugin Controller Template | |
* @file \modules\plugin\classes\controller\template\plugin.php | |
*/ | |
abstract class Controller_Template_Plugin extends Controller_Template | |
{ | |
public $event_markdown = TRUE; | |
public function before() |
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 defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* JSON helper class | |
* | |
* Examples: | |
* $j = JSON::decode('{"Organization": "Kohana"}'); // Good | |
* $j = JSON::decode("{'Organization': 'Kohana'}"); // Invalid | |
* $j = JSON::decode('{"Organization": "Kohana"}', NULL, 1); // depth stack exceeded | |
* | |
* @package Kohana |