Web development, build stage
These are tools I'm interested in to automate the process of building a website. I grow a need for a build stage, where I compile the website resources before they are production ready.
Read more »This is not a blog. This is my diary.
These are tools I'm interested in to automate the process of building a website. I grow a need for a build stage, where I compile the website resources before they are production ready.
Read more »Edit Tomcat's server.xml:
Source: Wim Mostrey.
Create tar file:
tar -cv -f FILENAME.tar DIR/FILES
Save this code as "db-truncate.sh".
#!/bin/bash
mysqldump -u$1 -p$2 --add-drop-table --no-data $3 | grep -e '^DROP \| FOREIGN_KEY_CHECKS' | mysql -u$1 -p$2 $3
For database dump: db-dump.sh
#!/bin/bash
mysqldump -hHOST -uUSER -pPASS DATABASE --no-data > DATABASE.schema.sql
mysqldump -hHOST -uUSER -pPASS DATABASE --ignore-table=DATABASE.search_index --ignore-table=DATABASE.cache% --extended-insert=FALSE --no-create-info --add-drop-table --compress | split --line-bytes=20000000 - DATABASE.sql.
gzip DATABASE.sql.*
If you need to copy directory including the hidden files, you need this.
Set shopt dotglobe option to enable.
shopt -s dotglob
Copy hidden files and folder.
cp -pr SOURCEDIR TARGETDIR
Set shopt dotglobe option to disable.
shopt -u dotglob
Source: labtestproject.com.
Read more »Recommit HEAD.
git commit --amend
Untrack files, when .gitignore and .git/info/exclude doesn't work.
Stop tracking files with:
git update-index --assume-unchanged MYFILE
Resume tracking files with:
git update-index --no-assume-unchanged MYFILE
Source: Stackoverflow.com.
Keep a note on which files being untracked. Git will not document this changes.
See the number of commits done to a repository.
git log -a --pretty=oneline | wc -l
Source: Chris Coyier.
WYSIWYM is not WYSIWYG. Well actually it is. But it is more geared toward using stylesheet than inline-css.
Currently I am struggling to master wymeditor.
I'll be using this for every site I made. Unless there's a higher authority that says otherwise.
The question is, how to make it works like LibreOffice.
drush vset cache 0
drush vset preprocess_css 0
drush vset preprocess_js 0
Source: stackoverflow.com.
drush -v sql-dump --gzip --ordered-dump --result-file=/PATH/DUMPHERE.sql
First nuke the database table.
drush -v sql-drop
Import our backup.
gunzip -c /PATH/DUMPHERE.sql.gz | mysql -hHOST -uUSER -pPASSWORD DATABASE
This is the list of html structure and design best practices. I leech them from blogs and stuff. I hope I could get as many reference as I can and pour them here.
Read more »