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
const queryStingToObject = (rawUrl) => { | |
if (_.isEmpty(rawUrl)) { | |
return {} | |
} | |
return _.zipObject(_.chain(rawUrl) | |
.replace('?', '') // a=b454&c=dhjjh&f=g6hksdfjlksd | |
.split('&') // ["a=b454","c=dhjjh","f=g6hksdfjlksd"] | |
// .map(_.partial(_.split, _, '=', 2)) // [["a","b454"],["c","dhjjh"],["f","g6hksdfjlksd"]] | |
.map((item) => { | |
item = item.split('='); |
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
window.Clipboard = (function(window, document, navigator) { | |
var textArea, | |
copy; | |
function isOS() { | |
return navigator.userAgent.match(/ipad|iphone/i); | |
} | |
function createTextArea(text) { | |
textArea = document.createElement('textArea'); |
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
# git helper alias | |
alias gd='git diff ' | |
alias gtc='git commit -m ' | |
alias gl='gl' | |
alias gm='git merge ' | |
alias go='git checkout ' | |
alias gch='git checkout -b ' | |
alias gtp='git pull ' |
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 | |
# # iterm setting | |
# # open file link to sublime | |
# # Preferences -> Profile -> Advance -> Semantic History --> Alaway run comman == /usr/local/bin/sublime \1:\2 | |
# IGNORE_BUCKET="node_modules|out|grunt|build|scriptsDL|css|bower_components|.git|vendor|test" | |
# searchTestFile="--scope=test" | |
# if [[ $2 = $searchTestFile ]] | |
# then |
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 | |
IGNORE_BUCKET="node_modules|out|grunt|build|scriptsDL|css|bower_components|.git|vendor|test" | |
if [[ -z $1 ]]; then | |
echo 'Required argument not provided, exiting...' | |
exit 1 | |
fi | |
# find and grep |
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
var inquirer = require('inquirer'); | |
const util = require('util'); | |
const exec = util.promisify(require('child_process').exec); | |
var shell = require('shelljs') | |
const webappDirs = [ | |
`guake -n guake -e 'cd ${'/home/dragonlaw/dragonApps/dragonlawWebApp'} && c && v' guake -r ${'Main'}`, | |
`guake -n guake -e 'cd ${'/home/dragonlaw/dragonApps/dragonlawWebApp/src/scripts/modules/document'} && c && v' guake -r ${'Document'}`, | |
`guake -n guake -e 'cd ${'/home/dragonlaw/dragonApps/dragonlawWebApp/src/scripts/modules/doctype'} && c && v' guake -r ${'Doctype'}`, | |
`guake -n guake -e 'cd ${'/home/dragonlaw/dragonApps/dragonlawWebApp/src/scripts/baseApp'} && c && v' guake -r ${'BaseApp'}`, |
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
var inquirer = require('inquirer'); | |
const util = require('util'); | |
const exec = util.promisify(require('child_process').exec); | |
// var process = require('process'); | |
async function goToApp(app = '~') { | |
const _cd = `cd ${app.path}` | |
console.log(`guake -n guake -e cd ${_cd} && fish && ${app.cmd}`); | |
// const { stdout, stderr } = await exec(`guake -n guake -e ${_cd}`); | |
// const { stdout, stderr } = await exec(`guake -n guake -e 'cd /home/dragonlaw/jumper/DLapp && fish'`); |
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
function logProps(WrappedComponent) { | |
return class extends React.Component { | |
componentWillReceiveProps(nextProps) { | |
console.log('Current props: ', this.props); | |
console.log('Next props: ', nextProps); | |
} | |
render() { | |
// Wraps the input component in a container, without mutating it. Good! | |
return <WrappedComponent {...this.props} />; | |
} |
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
# Path to Oh My Fish install. | |
set -q XDG_DATA_HOME | |
and set -gx OMF_PATH "$XDG_DATA_HOME/omf" | |
or set -gx OMF_PATH "$HOME/.local/share/omf" | |
# Load Oh My Fish configuration. | |
source $OMF_PATH/init.fish | |
alias gd='git diff ' | |
alias gtc='git commit -m ' |
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
echo '\n \n ============================ \n ' | |
echo ' Wellcome to DragonApp...\n' | |
echo "Choose App you want to work with today \n" | |
echo '============================ \n \n' | |
echo "1. Web App \n" | |
echo "2. Registration App \n" | |
echo "3. Partner Site App \n" |