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
########## | |
# EXPORT # | |
########## | |
# export db (schema only) | |
mysqldump -u username -ppassword --no-data --add-drop-database --databases db > db.sql | |
# export db | |
mysqldump -u username -ppassword --add-drop-database --databases db > db.sql |
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
/** | |
* A paging toolbar override to allow for hiding the refresh button in the toolbar. Compatible with Ext 4.2.0. | |
* | |
* @class Ext.toolbar.Paging | |
* @override | |
* @author Bostjan Rihter <[email protected]> | |
*/ | |
Ext.override(Ext.toolbar.Paging, { | |
/** | |
* @cfg {Boolean} enableRefresh |
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
/** | |
* A paging toolbar override to allow for hiding the refresh button in the toolbar. Compatible with Ext 4.2.1. | |
* | |
* @class Ext.toolbar.Paging | |
* @override | |
* @author Bostjan Rihter <[email protected]> | |
*/ | |
Ext.override(Ext.toolbar.Paging, { | |
/** | |
* @cfg {Boolean} enableRefresh |
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
/** | |
* A paging toolbar override that fixes the incorrect paging behaviour when navigating | |
* to a certain page (where page no. > 1), doing a remote load of data (i.e.: filtering | |
* data) and size of the remote data is less than store's defined pageSize. | |
* | |
* Compatible with ExtJS 4.2.1. | |
* | |
* @class Ext.toolbar.Paging | |
* @override | |
* @author Bostjan Rihter <[email protected]> |
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
-- backup table | |
create table TABLE_NAME_BACKUP as select * from TABLE_NAME; | |
create table user_20130809 as select * from user; | |
create table role_20130809 as select * from role; | |
create table function_20130809 as select * from function; | |
-- disable constraints | |
-- disable all constraints | |
begin |
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
-- create table | |
create table "TABLE_NAME" | |
( | |
"ID" NUMBER(9, 0) NOT NULL, | |
"COL_1" VARCHAR2(32) NULL, | |
"COL_2" DATE NULL, | |
"COL_3" NVARCHAR2(2000) NULL, | |
"COL_4" NUMBER(9, 0) NOT NULL, | |
constraint "PK_TABLE_NAME" PRIMARY KEY ("ID") | |
); |
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
-- create a partitioned table | |
-- use a default (unused) value for a dummy initial partition when dynamically adding more | |
create table `TABLE` ( | |
`id` int(10) not null, | |
... | |
) | |
collate='utf8_general_ci' | |
engine=MyISAM | |
partition by list (id) | |
( |
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
use information_schema; | |
select | |
concat('alter table `', c.table_name, '` add index `ix_', c.column_name, '` (`',c.column_name,'`);') | |
from columns c | |
where c.table_schema = 'SCHEMA_NAME' | |
and lower(c.column_name) like '%_id%' | |
and c.column_key = ''; |
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
<CodeSnippet Format="1.1.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<Header> | |
<Title>ext3_object</Title> | |
<Author>Bostjan Rihter</Author> | |
<Shortcut>ext3_object</Shortcut> | |
<Description>ExtJS object snippet</Description> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
</Header> |
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
# resize | |
# 25600 = 25 * 1024MB | |
VBoxManage clonehd "NAME.vmdk" "NAME_CLONE.vdi" --format vdi | |
VBoxManage modifyhd "NAME_CLONE.vdi" --resize 25600 | |
VBoxManage clonehd "NAME_CLONE.vdi" "NAME1.vmdk" --format vmdk | |
# download gparted iso and mount it in virtualbox | |
# extend the partition in gparted, apply changes | |
# unmount the iso |
OlderNewer