{"id":2,"jsonrpc":"2.0","method":"calculateDatabaseSteps","params":{"projectInfo":"","assumeToBeApplied":[{"stepType":"CreateEnum","enum":"ItemType","values":["TASK","NOTE","EVENT","CHECKIN"]},{"stepType":"CreateEnum","enum":"LogType","values":["DAILY","MONTHLY","YEARLY"]},{"stepType":"CreateModel","model":"User"},{"stepType":"CreateField","model":"User","field":"id","type":"String","arity":"required"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"default"},{"stepType":"CreateDirectiveArgument","model":"User","field":"id","directive":"default","argument":"","value":"cuid()"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"id"},{"stepType":"CreateDirective","model":"User","field":"id","directive":"unique"},{"stepType":"CreateField","model":"User","field":"createdAt","type":"DateTime","arity":"required"},{"stepType":"CreateDirective","model":"User","field":"createdAt","directive":
This file contains 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
homekit: | |
- name: Climate | |
port: 56335 | |
filter: | |
include_domains: | |
- climate | |
- fan | |
include_entity_globs: | |
- fan.* | |
- climate.* |
This file contains 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 * as React from "react"; | |
import { useMousePosition } from "~/hooks/useMousePosition"; | |
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */ | |
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) { | |
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {}; | |
const [mouseX, mouseY] = useMousePosition(); | |
const positions = { x, y, h, w, mouseX, mouseY }; | |
return ( | |
<div |
This file contains 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 * as React from "react"; | |
import { throttle } from "lodash"; | |
/** | |
* Mouse position as a tuple of [x, y] | |
*/ | |
type MousePosition = [number, number]; | |
/** | |
* Hook to get the current mouse position |
This file contains 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
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 17, | |
// font family with optional fallbacks | |
fontFamily: 'Fira Code, Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// "Inconsolata Awesome", |
This file contains 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
require('./Loading.sass'); | |
import React from 'react'; | |
import classNames from 'classnames'; | |
import { VelocityTransitionGroup } from 'velocity-react'; | |
/** | |
* The Loading component should be used if your content needs to wait on data from the server before being rendered. | |
* |
I hereby claim:
- I am chrisdrackett on github.
- I am chrisdrackett (https://keybase.io/chrisdrackett) on keybase.
- I have a public key whose fingerprint is A6F7 286F E0BE 6F10 C9F6 6883 C1A7 0200 6E54 9575
To claim this, I am signing this object:
This file contains 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 requests | |
while True: | |
MODEL = "ME278LL/A" | |
stores = requests.get('http://store.apple.com/us/retail/availabilitySearch?parts.0=ME278LL%2FA&zip=98033').json() | |
for store in stores['body']['stores']: | |
if store[u'partsAvailability'][MODEL]['pickupDisplay'] !='unavailable': | |
if 'Bellevue' in store['storeDisplayName']: |
This file contains 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
=iphone($width:320px) | |
$screen_width: $width | |
$screen_height: $screen_width * 1.7948717949 | |
$iphone_width: $screen_width * 1.11111 | |
$iphone_height: $screen_height * 1.3261904762 | |
$iphone_buttons: $screen_width * 0.024 | |
.iphone |
This file contains 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
"""Minify Javascript using `UglifyJS <https://github.com/mishoo/UglifyJS/>`_. | |
UglifyJS is an external tool written for NodeJS; this filter assumes that | |
the ``uglifyjs`` executable is in the path. Otherwise, you may define | |
a ``UGLIFYJS_BIN`` setting. | |
""" | |
import subprocess | |
from webassets.exceptions import FilterError | |
from webassets.filter import Filter |
NewerOlder