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 | |
tmpFile1=~/.tmp1$$ | |
tmpFile2=~/.tmp2$$ | |
database=$1 | |
database_local=$2 | |
function cleanFiles() { | |
rm $tmpFile1 $tmpFile2 > /dev/null 2>&1; | |
exit; |
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
Create a post flow: | |
1- Generate an access token: | |
//TODO search how to do this programmatically | |
2- Send a request to blogger with post content | |
URI: https://www.googleapis.com/blogger/v3/blogs/$blogId/posts | |
Header: |
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
public void run() { | |
StringBuilder sb = new StringBuilder(); | |
while (true) { | |
try { | |
byte[] buffer = new byte[1024]; | |
int bytes; | |
int bytesRead = -1; | |
do { |
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
# Example aliases | |
alias zshconfig="vim ~/.zshrc" | |
# alias ohmyzsh="mate ~/.oh-my-zsh" | |
alias gpom='git pull origin master' | |
alias mvncli='mvn clean install package' | |
alias jjar='java -jar' | |
alias run='mvn spring-boot:run' | |
alias legacydb='mysql -u root -proot -D legacy' | |
alias stagingdb='mysql -u dev_debug -p"v1owd*C$>+" -D platform_staging -h phoenix-db-qa.clickbus.net -A' |
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
SELECT * | |
FROM | |
KEY_COLUMN_USAGE | |
WHERE | |
REFERENCED_TABLE_NAME = 'table_name' |
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
http://www.baeldung.com/rest-api-search-language-spring-data-querydsl |
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
" Vundle setup | |
set nocompatible | |
filetype off | |
" set the runtime path to include Vundle and initialize | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
Plugin 'tpope/vim-fugitive' |
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
# Set ^a as default key-binding | |
set -g prefix C-a | |
unbind-key C-b | |
# use | and - to split the windows | |
bind-key | split-window -h | |
bind-key - split-window -v | |
# make the first window number start at 1 | |
set -g base-index 1 |
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
mysqldump -h [host] -u [user] -p"password" [--lock-tables=false] db_name [table_name] > dump.sql |