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
Show hidden characters
{ | |
"bold_folder_labels": true, | |
"detect_indentation": true, | |
"drag_text": true, | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"font_face": "Monaco", | |
"font_size": 14.0, | |
"highlight_line": true, | |
"highlight_modified_tabs": true, |
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
/* | |
{ | |
"name": "project", | |
"version": "0.0.0", | |
"devDependencies": { | |
"gulp": "^3.8.8", | |
"gulp-concat": "^2.4.0", | |
"gulp-rename": "^1.2.0", | |
"gulp-stylus": "^1.3.2", |
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 timeField(input) { | |
var time = '23:59' | |
var mins = '00' | |
var numberPattern = /\d|:/g ; | |
var noDotsPattern = /\d/g ; | |
input.keyup(function(e){ | |
var len = input.val().length; | |
var match = input.val().match(numberPattern); |
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.addEventListener('touchstart', handleTouchStart, false); | |
document.addEventListener('touchmove', handleTouchMove, false); | |
var xDown = null; | |
var yDown = null; | |
function handleTouchStart(evt) { | |
xDown = evt.touches[0].clientX; | |
yDown = evt.touches[0].clientY; | |
}; |
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
npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' | xargs npm -g rm |
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 unittest.mock import Mock, patch | |
from path.to.your.class import Classname | |
"""if you need to mock class feild:""" | |
@patch.object(Classname, 'Fieldname', new=<new_value>) | |
def your_test(self): | |
"""If you need to mock class method:""" |
class Foo {
constructor() {
this.handleClick = this.handleClick.bind(this)
}
consoleLog () {
console.log('consoleLog')
console.log(this)
console.log('-------')
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 getOptions = require('loader-utils').getOptions; | |
const validateOptions = require('schema-utils'); | |
module.exports = function (source) { | |
const schema = { | |
type: 'object', | |
properties: { | |
attributes: { | |
type: 'array', | |
items: { |