MySQL/Language/Definitions: what are DDL, DML and DQL? 

--DDL (Data Definition Language) refers to the CREATE, ALTER and DROP statements

DDL allows to add / modify / delete the logical structures which contain the data or which allow users to access / mantain the data (databases, tables, keys, views...). DDL is about "metadata".

--DML (Data Manipulation Language) refers to the INSERT, UPDATE and DELETE statements

DML allows to add / modify / delete data itself.

--DQL (Data Query Language) refers to the SELECT, SHOW and HELP statements (queries)

SELECT is the main DQL instruction. It retrieves data you need. SHOW retrieves infos about the metadata. HELP... is for people who need help.

--DCL (Data Control Language) refers to the GRANT and REVOKE statements

DCL is used to grant / revoke permissions on databases and their contents. DCL is simple, but MySQL's permissions are rather complex. DCL is about security.

--DTL (Data Transaction Language) refers to the START TRANSACTION, SAVEPOINT, COMMIT and ROLLBACK [TO SAVEPOINT] statements

DTL is used to manage transactions (operations which include more instructions none of which can be executed if one of them fails).

[ view entry ] ( 1967 views )   |  print article
Relative Path vs Full Path (basics 101) 
Absolute path contains full name of file including the source, for instance, c:\Windows\Temp\log.txt. Relative path contains only the path relativaly to a certain folder, for instance, relative path of log.txt relativaly to the folder Windows is Temp\log.txt.

This also applies to URLs:

Full path:
dev.ourbiz.net/full/path/to/file.html

Relative path:
relative/path/to/file.html



[ view entry ] ( 1606 views )   |  print article
Notes Section 
This section includes my notes from different sources: web, man pages, documentation, manuals, etc.

This is how google defines a note:

   (noun) A brief record, especially one written down to aid the memory.


I re-categorized the notes section! Misc. section includes JS, HTML and CSS. 5-12-2013 :)



[ view entry ] ( 1313 views )   |  print article
Awesome Phrases, Sayings and Quotes! 
Creativity is limitless. Use and abuse your brain wisely, that's what it's meant for. --AngelCool

Hay ciertas cosas que en los libros no vienen de pronto aparecen pero que hay que saber. --Jarabe De Palo

The Only Thing That Never Changes Is That Everything Is Always Changing. --web

Simplicity is the ultimate sophistication. --Leonardo da Vinci

KISS --US Navy

Keep it simple, it'll become complicated by itself. --me & web

Work hard, Play Hard. --web

The man who does not work for the love of work but only for money is not likely to make money nor find much fun in life. --Charles Schwab

You don't have to be faster than the bear, you just have to be faster than the slowest guy running from the bear. [ :( for that guy ] --?

Don't let your ego get too close to your position, so that if your position gets shot down, your ego doesn't go with it. --Colin Powell

...more coming :)

[ view entry ] ( 2473 views )   |  print article
SVN Basic Tasks (to be completed) 


//Reconciling with trunk
svn merge --depth infinity --accept theirs-full https://server02.company.com/repos/main/branches/acool https://server02.company.com/repos/main/trunk .

//Reverting
svn revert -R .

//Updating a file to an old version (cannot commit)
svn update -r 3678 myfile.txt

//reverse merge a directory
cd events
svn merge -r HEAD:2688 .

//reverse merge a file
svn -c -3445 myfile.txt //reverts to 3444


DEV

TEST CHANGES
/usr/bin/ssh admin@dev.company.com /usr/bin/svn --summarize diff https://server02.company.com/repos/main/trunk@32185 https://server02.company.com/repos/main/trunk@HEAD

PUSH
/usr/bin/ssh admin@dev.company.com /usr/bin/svn --depth infinity --accept theirs-full --force sw https://server02.company.com/repos/main/trunk@HEAD /var/www/html/main




STAGING

TEST CHANGES
/usr/bin/ssh admin@staging.company.com /usr/bin/svn --summarize diff https://server02.company.com/repos/main/releases/3.14@32188 https://server02.company.com/repos/main/releases/3.14@HEAD

PUSH
/usr/bin/ssh admin@staging.company.com /usr/bin/svn --depth infinity --accept theirs-full --force sw https://server02.company.com/repos/main/releases/3.14/@HEAD /var/www/html/main




LIVE


TEST CHANGES
/usr/bin/ssh admin@preview.company.com /usr/bin/svn --summarize diff https://server02.company.com/repos/main/releases/3.14@32186 https://server02.company.com/repos/main/releases/3.14@HEAD

/usr/bin/ssh admin@www-server01.lax.company.com /usr/bin/svn --summarize diff https://server02.company.com/repos/main/releases/3.14@31313 https://server02.company.com/repos/main/releases/3.14@HEAD

/usr/bin/ssh admin@www-server02.lax.company.com /usr/bin/svn --summarize diff https://server02.company.com/repos/main/releases/3.14@31313 https://server02.company.com/repos/main/releases/3.14@HEAD

/usr/bin/ssh admin@www-server03.lax.company.com /usr/bin/svn --summarize diff https://server02.company.com/repos/main/releases/3.14@31313 https://server02.company.com/repos/main/releases/3.14@HEAD


PUSH
/usr/bin/ssh admin@www-server01.lax.company.com /usr/bin/svn --depth infinity --accept theirs-full --force sw https://server02.company.com/repos/main/releases/3.14/@HEAD /var/www/html/main

/usr/bin/ssh admin@www-server02.lax.company.com /usr/bin/svn --depth infinity --accept theirs-full --force sw https://server02.company.com/repos/main/releases/3.14/@HEAD /var/www/html/main

/usr/bin/ssh admin@www-server03.lax.company.com /usr/bin/svn --depth infinity --accept theirs-full --force sw https://server02.company.com/repos/main/releases/3.14/@HEAD /var/www/html/main

/usr/bin/ssh admin@preview.company.com /usr/bin/svn --depth infinity --accept theirs-full --force sw https://server02.company.com/repos/main/releases/3.14/@HEAD /var/www/html/main


//check out
svn co

//determine current branch (svn client)
svn info

//adding new files
svn add


//check in
svn commit
svn ci


//
svn status

//
svn switch

// to create branches in server (to verify this)
svn copy



//
svn log -vl 5

//
svn export

//
svn revert


/************other info************/

svn uses port 3690/tcp

/etc/init.rd/svnserve start|restart|stop

svnadmin create REPO

vim REPO/conf/authz
vim REPO/conf/passwd
vim REPO/conf/svnserve.conf



[ view entry ] ( 1621 views )   |  print article
VIM Basic Tasks (to be completed ) 
//In Vim, what's an elegant way to grab output from the command-line? (see :help :r!)
:r !echo "foo"

//inserting a new line after current line
o

//inserting a line before current line
O

//Piping output of a command to vim and 'save as'
uname | vi -
:saveas

//VIM Terminology
yank (copy in windows lingo)
delete (cut in windows lingo)
put (paste in windows lingo)


//yank (copy) a line
yy

//delete (cut) a line
dd

//put (paste) a line
p

//using marks to yank multiple lines
ma
y'a
//Example:
ma~~~~~~~~~~~~~~
~~~~~text~~~~~~~~
y'a~~~~~~~~~~~~~~

//Inserting a character X number of times
<ESC>
250
i
a
<ESC>

//cut a line
v this-is-the-line d

//undo
u

//search
/

//search next
n

//write and copy (save and exit in windows lingo)
wq

//the ! overwrites
wq!

//comparing two files
vimdiff -O test1.txt test2.txt
vimdiff -o test1.txt test2.txt //horizontally

//opening multiple files
vim -O file1.txt file2.txt
vim -o file1.txt file2.txt //horizontally

//creating another file while editing one
:vert new test.txt
:vsplit test.txt
:vsp test.txt

//horizontally
:split
:sp

//changing windows
ctrl ww

//go to specific line
:77

//practice
shell$ vimtutor

[ view entry ] ( 1545 views )   |  print article
Deleting the Master Boot Record (MBR) of a drive. 
/*
You can delete the mbr (master boot recored) using the dd command itself. The following command will completely delete your MBR, which contains all your partition information. So make sure you use the correct device name:
*/

# dd if=/dev/zero of=/dev/sdc bs=512 count=1


http://www.cyberciti.biz/faq/linux-clea ... d-command/


[ view entry ] ( 1514 views )   |  print article
Apache File Compression (Speeding up websites) 
Speed up load times by automatically compressing CSS, HTML and JavaScript files in Apache. Compressed files are smaller and faster to send, for Apache 2.x, use mod_gzip or the built-in mod_deflate module.

The mod_gzip and mod_deflate modules both add file compression features to Apache. When enabled and configured, text-based files and script output is automatically compressed before it is sent to the visitor’s browser. While the effort to compress a file slows down the web server, this slow down is easily offset by the time saved to send the much smaller compressed file. This is particularly true when the server or the site visitor have a slow network connection.



[ view entry ] ( 1643 views )   |  print article
Border-Radius property in CSS (Cascading Style Sheets) 
/*

One of the most keenly-anticipated CSS3 properties is border-radius. Web designers will no longer have to resort to complex table structures using custom-made corner graphics or including arcane JavaScript files in order to produce designs with rounded corners. The border-radius CSS property allows Web authors to define how rounded border corners are. Check browser support.

*/

<!DOCTYPE html>
<html>
<head>
<style>

div
{
border-style: solid;
border-width: 2px;
-moz-border-radius: 15px;
-webkit-border-radius: 15px;
border-radius: 15px;

}

</style>
</head>
<body>

<div>The border-radius property allows you to add rounded corners to elements.</div>

</body>
</html>



[ view entry ] ( 2076 views )   |  print article
GIT Tasks 
# filter logs by date range
[acool@acool topsecret-host]$ git log --date=iso --pretty=format:"%ad %H - %an: %s" --after="2014-06-01" --until="2014-11-31" > commits-2014-06-to-2014-11.txt


//revert your working copy
git rm -r .
git checkout SHA1 .
//or (irreversible)
get reset --hard SHA1

//New repository(execute in project directory) (..I think git clone does this)
git init

//Listing, creating or deleting branches
git branch

//Changing branches
git checkout

//Committing changes
git commit

//Download remote repository
git clone

//Updating local repository
git pull //it fetches and merges remote repository with local repository (equals to: git fetch & git merge)

//Uploading local repository to remote repository
git push

//To see status and log entries run:
git status
git log
git log --stat SHA1
git log --name-status SHA1
git log -n 1 //last commit


//Workflow:



...another workflow example:




[ view entry ] ( 1746 views )   |  print article

<<First <Back | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | Next> Last>>


2024 By Angel Cool