Skip to content

Instantly share code, notes, and snippets.

@debovis
debovis / package.json
Last active January 16, 2024 14:13
How to debug gatsby and reactjs with webstorm
{
"name": "project-name",
"version": "1.0.0",
"description": "",
"main": "n/a",
"scripts": {
"serve": "gatsby develop -p 5000",
"dev": "node $NODE_DEBUG_OPTION ./node_modules/.bin/gatsby develop -p 5000",
}
}
milk = {'weight' : 7.8,'name': 'Milk', 'price': 2.99, 'taxable': False, 'upc': '0001'}
apples = {'weight' : 3.1, 'name': 'Apples', 'price': 3.99, 'taxable': False, 'upc': '0002'}
bread = {'weight' : 1.25, 'name': 'Bread', 'price': .99, 'taxable': False, 'upc': '0003'}
beer = {'weight' : 4.9, 'name': 'Beer', 'price': 7.99, 'taxable': True, 'upc': '0004'}
chips = {'weight' : 0.96, 'name': 'Chips', 'price': 1.50, 'taxable': False, 'upc': '0005'}
wine = {'weight' : 3.18, 'name': 'Red Wine', 'price': 9.99, 'taxable': True, 'upc': '0006'}
oreos = {'weight' : 1.08, 'name': 'Double Stuf Oreos', 'price': 2.50, 'taxable': False, 'upc': '0007'}
sushi = {'weight' : 1.65, 'name': 'Veggie Sushi', 'price': 5.99, 'taxable': False, 'upc': '0008'}
sprite = {'weight' : 2.82, 'name': 'Sprite', 'price': 3.99, 'taxable': True, 'upc': '0009'}
candy = {'weight' : 0.43, 'name': 'Sour Patch Kids', 'price': 1.99, 'taxable': True, 'upc': '0010'}
@MoOx
MoOx / index.web.js
Last active January 7, 2019 16:36
react-native-web partial Picker implementation (using react-native-web@0.0.44) https://github.com/necolas/react-native-web/issues/195
// @flow
// partial dirty implementation of react-native Picker
// should match http://facebook.github.io/react-native/docs/picker.html
// https://github.com/necolas/react-native-web/issues/184
import createDOMElement from "react-native-web/dist/modules/createDOMElement"
import PickerItem from "./item.web.js"
@cjohansen
cjohansen / gist:739589
Created December 13, 2010 20:55
Showing how to fake server requests with Sinon.JS and Jasmine
/*
Load Sinon.JS in the SpecRunner:
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine.js"></script>
<script type="text/javascript" src="lib/jasmine-1.0.1/jasmine-html.js"></script>
<script type="text/javascript" src="sinon-1.0.0.js"></script>
<script type="text/javascript" src="sinon-ie-1.0.0.js"></script>
http://cjohansen.no/sinon/
*/