http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
http://guides.rubyonrails.org/migrations.html
# rake deploy # Push app to heroku:production, migrate, restarts and tail logs | |
# rake deploy:production # Push app to production, migrate, restarts, tag and tail logs | |
# rake deploy:production:config # production config | |
# rake deploy:production:console # production console | |
# rake deploy:production:logs # production logs | |
# rake deploy:production:ps # production ps | |
# rake deploy:production:releases # production releases | |
# rake deploy:staging # Push app to staging, migrate, restarts, tag and tail logs | |
# rake deploy:staging:config # staging config | |
# rake deploy:staging:console # staging console |
.cnt-top{ | |
display: table; | |
height: 100%; | |
width: 100%; | |
text-align: center; | |
.cnt-middle{ | |
display: table-cell; | |
vertical-align: middle; | |
.cnt-inner{ | |
margin-left: auto; |
git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))' |
AES is a block-level algorithm. So when data encrypted it is padded. So you can calculate the length of the result string using this formula: | |
1 | |
16 × (trunc(string_length / 16) + 1) | |
So if your address field structure is = VARCHAR(100) ; //100 length of varchar | |
Then before your encryption it should be converted | |
= 16 * (trunc(100/ 16) + 1) | |
= 16 * (6.25 + 1) | |
= 16 * 7.25 | |
= 116 |
Git Tips & Tricks | |
Add your best Git tricks here! | |
Share the love! | |
The "I can never remember that alias I set" Trick | |
[alias] | |
aliases = !git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /' | sort |
sass-convert -F scss -T sass application_styles.css.scss application_styles.css.sass |
DB_USERNAME ?= dbuser | |
DB_PASSWORD ?= dbpass | |
BIND_HOST ?= 0.0.0.0 | |
POSTGRESQL_IMAGE ?= postgres:9.6 | |
POSTGRESQL_CONTAINER ?= upper-postgresql | |
POSTGRESQL_PORT ?= 5432 | |
MYSQL_IMAGE ?= mysql:5.7 |
sudo rm -fr /Library/Java/JavaVirtualMachines/jdk-9.jdk/ | |
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin | |
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefPane | |
package com.ruby.cms.comp.aggregator.util.config; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.aop.interceptor.AsyncUncaughtExceptionHandler; | |
import org.springframework.aop.interceptor.SimpleAsyncUncaughtExceptionHandler; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.core.task.AsyncTaskExecutor; | |
import org.springframework.scheduling.annotation.AsyncConfigurer; |