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
[alias] | |
lg = lg1 | |
lg1 = lg1-specific --all | |
lg2 = lg2-specific --all | |
lg3 = lg3-specific --all | |
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' | |
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' |
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
import React, { PureComponent } from 'react'; | |
import values from 'lodash/fp/values'; | |
import flow from 'lodash/fp/flow'; | |
import forEach from 'lodash/fp/forEach'; | |
import getDisplayName from '@/utils/getDisplayName'; | |
/** | |
* Higher Order Function that returns a HOC to attach Components as static props based on a | |
* set of values. | |
* It allows you to go from: |
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
import flow from 'lodash/fp/flow'; | |
import filter from 'lodash/fp/filter'; | |
import reduce from 'lodash/fp/reduce'; | |
const filesPaths = require.context('.', true, /.js$/); | |
const files = flow( | |
filter(page => page !== './index.js'), | |
reduce((acc, page) => { | |
const [ |
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
pm2 start npm --name "NAME" -- run script-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
const OMDB_ENDPOINT = 'http://www.omdbapi.com'; | |
class OMDbService { | |
async searchMovies(searchValue) { | |
const url = `${OMDB_ENDPOINT}/?s=${searchValue}`; | |
const response = await fetch(url, { | |
method: 'GET', | |
headers: { | |
Accept: 'application/json' |
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
import { createLogger } from 'redux-logger'; | |
const logger = createLogger({ | |
stateTransformer: (state) => { | |
const newState = {}; | |
const stateObj = state.toObject(); | |
for (const i of Object.keys(stateObj)) { | |
if (Iterable.isIterable(stateObj[i])) { | |
newState[i] = stateObj[i].toJS(); |
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 | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 | |
echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list | |
sudo apt-get update | |
sudo apt-get install -y mongodb-org |
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
// From this answer on Stack Overflow | |
// http://stackoverflow.com/questions/18502999/git-extensions-win32-error-487-couldnt-reserve-space-for-cygwins-heap-win32 | |
C:\Program Files (x86)\Git\bin>rebase.exe -b 0x50000000 msys-1.0.dll |
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 | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update && sudo apt-get install yarn |
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 | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository -y ppa:hvr/ghc | |
sudo apt-get update | |
sudo apt-get install -y cabal-install-1.22 ghc-7.10.3 | |
cat >> ~/.bashrc <<EOF | |
export PATH="\$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:\$PATH" | |
EOF | |
export PATH=~/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$PATH |
NewerOlder