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
shouldComponentUpdate(nextProps, nextState) { | |
console.log('props') | |
console.log(this.props); | |
console.log(nextProps); | |
console.log(this.props === nextProps); | |
console.log('state') | |
console.log(this.state); | |
console.log(nextState); |
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 { round10 } from 'round10'; | |
export function formatMaxDataUnit(quantity, currentUnit = 'Bytes') { | |
if (quantity < 1024) { | |
return `${round10(quantity, -2)} ${currentUnit}`; | |
} | |
const nextUnit = { | |
Bytes: 'KB', | |
KB: 'MB', |
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 jquery from 'jquery'; | |
// IIFE | |
export default (function(testLib){ | |
testLib(jquery, window, document); | |
}(function($, w, d){ | |
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
{ | |
"always_show_minimap_viewport": true, | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"disable_tab_abbreviations_on_auto_complete": false, | |
"draw_white_space": "all", | |
"fade_fold_buttons": false, | |
"font_face": "Operator Mono Book", | |
"font_options": |
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
// html | |
window.injectors.baseUrl = '<?= urlHelper('') ?>'; | |
// mixins/injectors.js | |
const injectorsObj = {}; | |
// eslint-disable-next-line no-undef | |
Object.keys(window.injectors).forEach((injector) => { |
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
1) Create a branch with the tag | |
git branch {tagname}-branch {tagname} | |
git checkout {tagname}-branch | |
2) Include the fix manually if it's just a change .... | |
git add . | |
git ci -m "Fix included" | |
or cherry-pick the commit, whatever is easier | |
git cherry-pick {num_commit} | |
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 |
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
// 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 | |
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 |