This file contains 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
let dragons = []; | |
for(let i = 0; i < 6e6; i++) { | |
dragons.push({ name: "Json", size: 3 }); | |
dragons.push({ name: "Groovert", size: 1 }); | |
} | |
dragons.length; //? | |
// Transformers | |
const map = (accum, current) => { accum.push(current); return accum; } |
This file contains 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
# bash | |
git config --global user.name 'Victor Huerta' | |
git config --global core.editor 'code --wait' | |
git config --global user.email vhuertahnz@gmail.com | |
git config --global merge.tool vscode | |
git config --global mergetool.vscode.cmd 'code --wait $MERGED' | |
git config --global diff.tool vscode | |
git config --global difftool.vscode.cmd 'code --wait --diff $LOCAL $REMOTE' | |
# verify config at git config --global -e |
This file contains 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 branch -m old_branch new_branch # Rename branch locally | |
git push origin :old_branch # Delete the old branch | |
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote |
This file contains 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
import axios from 'axios' | |
const apiUrl = '/rest/' | |
// allow use http client without Vue instance | |
export const http = axios.create({ | |
baseURL: apiUrl, | |
headers: { | |
'X-Requested-With': 'XMLHttpRequest' | |
} |
This file contains 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
import {connect} from 'react-redux'; | |
import Component from 'component-path'; | |
import actions from 'actions-path'; | |
import {withRouter} from 'react-router-dom'; | |
const mapStateToProps = (state, ownProps) => { | |
return {}; | |
}; |
This file contains 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
# Install Docker | |
brew install Caskroom/cask/docker-toolbox | |
# Create a Docker machine named default | |
docker-machine create --driver virtualbox default | |
# Set ENV vars | |
eval "$(docker-machine env default)" | |
## | |
## Setup mongo | |
## |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.098039217293262482</real> |
This file contains 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
CURRENT_BG='NONE' | |
SEGMENT_SEPARATOR='' | |
collapse_pwd() { | |
echo $(pwd | sed -e "s,^$HOME,~," | sed "s@\(.\)[^/]*/@\1/@g") | |
} | |
prompt_segment() { | |
local bg fg | |
[[ -n $1 ]] && bg="%K{$1}" || bg="%k" |
This file contains 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 | |
sudo kextunload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport | |
sudo kextload -b com.apple.iokit.BroadcomBluetoothHostControllerUSBTransport |
This file contains 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
{ | |
"indent_size": 4, | |
"indent_char": " ", | |
"other": " ", | |
"indent_level": 0, | |
"indent_with_tabs": false, | |
"preserve_newlines": true, | |
"max_preserve_newlines": 1, | |
"jslint_happy": true, | |
"html": { |