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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "chrome", | |
"request": "launch", | |
"name": "Next: Chrome", |
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
/^(?!\s).*$/ |
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
syncSettings: { | |
quiet: false, | |
accelerators: { | |
checkForUpdates: 'CmdOrCtrl+8' |
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 memoize(func) { | |
const memo = {}; | |
return function() { | |
const args = [...arguments]; | |
if (args in memo) { | |
return memo[args]; | |
} | |
else { |
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 debounce = (callback, delay) => { | |
let timerId; | |
return (...args) => { | |
timerId && clearTimeout(timerId); | |
timerId = setTimeout( | |
() => callback(...args), | |
delay | |
); | |
} | |
}; |
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
if (module.hot && process.env.NODE_ENV !== 'production') { | |
console.log('HMR enabled') | |
module.hot.accept('./components/App', () => { | |
const NextApp = App.default | |
ReactDOM.render( | |
<NextApp />, | |
document.getElementById('root') | |
) | |
}); | |
} |
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
sudo tar xfz WebStorm-*.tar.gz -C /opt/ |
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 find from 'lodash/find'; | |
import findIndex from 'lodash/findIndex'; | |
import moment from 'moment'; | |
import Vue from 'vue'; | |
import Vuex from 'vuex'; | |
Vue.use(Vuex); | |
const state = { | |
isAuthenticated: false, |
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
$('[data-action=link]').click(function(e){ | |
e.preventDefault(); | |
var toId = $(this).attr('href'); | |
$('html,body').animate({ | |
scrollTop:($(toId).offset().top) | |
}, 500); | |
}); |
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
$(document).ready(function(){ | |
$('body').on('dragenter', function(){ | |
$('input[type="file"]').addClass('drag'); | |
console.log('enter'); | |
}); | |
$('input[type="file"]').on('dragleave', function(e){ | |
e.stopPropagation(); | |
$('input[type="file"]').removeClass('drag'); |
NewerOlder