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
const prefix = "awtrix1"; | |
const appName = "countdown"; | |
const now = new Date(); | |
const today = new Date(now.getFullYear(), now.getMonth(), now.getDate()); | |
const schedule = [ | |
{ | |
date: { day: 1, month: 1 }, | |
text: "First of January every year", | |
icon: "14004", |
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
{ | |
"name": "v0.1.1", | |
"notes": "Updater Test", | |
"pub_date": "2021-02-03T10:00:00Z", | |
"platforms": { | |
"darwin": { | |
"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVRbzgzUkZ1M2NQWUcveDc5K1M1OXl2MHBvZnlzemkwWUJPTDU5YkNBYWlrbzYxS09VMVE2SlY5ZW8rSW16Tk1lYWREWHNiSlBDVVVCWFBTSkViUkZiOUhKK0Vac1ZNMXc0PQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNjQzODc5NDk2CWZpbGU6L1VzZXJzL3J1bm5lci93b3JrL2xhbmVzL2xhbmVzL3NyYy10YXVyaS90YXJnZXQvcmVsZWFzZS9idW5kbGUvbWFjb3MvTGFuZXMuYXBwLnRhci5negpMOWpLTTVJQjUxdlZaNmNGMlVVQkJLdE1GQyt2bHBZQVlhNmE4TElNTVRackFhdGpVc0VFbGVuZktQYklGbkVaZnlnNjF5aXJsZjdJWEFQRWlLWXhCZz09Cg==", | |
"url": "https://github.com/swissmanu/lanes/releases/download/v0.1.0/Lanes.app.tar.gz" | |
}, | |
"linux": { |
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
export type Tuple2<A, B> = [A, B]; | |
export type Tuple3<A, B, C> = [A, B, C]; | |
export type Tuple4<A, B, C, D> = [A, B, C, D]; | |
export type Tuple5<A, B, C, D, E> = [A, B, C, D, E]; | |
export type Tuple6<A, B, C, D, E, F> = [A, B, C, D, E, F]; | |
export type Tuple7<A, B, C, D, E, F, G> = [A, B, C, D, E, F, G]; | |
export type Tuple8<A, B, C, D, E, F, G, H> = [A, B, C, D, E, F, G, H]; | |
export type Tuple9<A, B, C, D, E, F, G, H, I> = [A, B, C, D, E, F, G, H, I]; | |
export type Tuple10<A, B, C, D, E, F, G, H, I, J> = [A, B, C, D, E, F, G, H, I, J]; |
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
const fs = require('fs'); | |
const retrace = require('retrace'); // yarn add retrace | |
const path = require('path'); | |
retrace.resolve = uri => { | |
// assumes that source maps are in the same directory as this script, but in | |
// a `maps` folder: | |
return readFile(path.join(__dirname, 'maps', `${path.basename(uri)}.map`)); | |
}; |
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
Editable Page | |
Error | |
Reset -> View | |
View* | |
Read | |
Change Data -> WaitForEdit | |
Request Edit -> WaitForEdit | |
WaitForEdit | |
Ready -> Edit | |
Error -> Error |
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 { Rule, Tree } from '@angular-devkit/schematics'; | |
import * as prettier from 'prettier'; | |
import { Observable } from 'rxjs'; | |
export default function(): Rule { | |
return (tree: Tree) => | |
new Observable<Tree>(o => { | |
prettier.resolveConfig(process.cwd()).then(prettierConfig => { | |
if (!prettierConfig) { | |
o.error(new Error('Could not resolve prettier configuration')); |
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
Button | |
Disabled | |
enable -> Enabled | |
Enabled* | |
disable -> Disabled | |
Inactive | |
focus -> Active | |
mouseEnter -> Hovered | |
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
function Input<T>({ | |
value, | |
onChange, | |
children, | |
serialize, | |
deserialize | |
}: { | |
value: T; | |
deserialize: (value: T) => string | null; | |
serialize: (rawValue: string | null) => T; |
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
< HTTP/1.1 302 Found | |
< Content-Length: 34 | |
< Content-Type: text/html; charset=utf-8 | |
< Date: Wed, 05 Dec 2018 09:32:46 GMT | |
< Location: /user/login | |
< Set-Cookie: lang=en-US; Path=/; Max-Age=2147483647 | |
< Set-Cookie: i_like_gogs=346ffxxxxxxxae8b; Path=/; HttpOnly | |
< Set-Cookie: _csrf=Pka0s5RZO-QhdGetTwxxxxxxxxxxNjcxxxxxxx3D%3D; Path=/; Expires=Thu, 06 Dec 2018 09:32:46 GMT; HttpOnly | |
< Set-Cookie: redirect_to=%252Fuser%252Frepos; Path=/ |
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
// setState signature borrowed from react 😇 | |
interface WithStateProps<S> { | |
initialState: S; | |
children: ( | |
state: S, | |
setState: <K extends keyof S>( | |
state: ((prevState: Readonly<S>, props: {}) => Pick<S, K> | S | null) | (Pick<S, K> | S | null), | |
callback?: () => void | |
) => void | |
) => React.ReactChild; |
NewerOlder