## 👋
I've created Dracula inspired theme for Anki Cards. You're going to find Basic and Cloze cards. You can see theme here.
export interface NonEmptyArray<A> extends ReadonlyArray<A> { | |
// tslint:disable-next-line: readonly-keyword | |
0: A; | |
} | |
type ReadOnlyNotEmptyArray<T> = Readonly<NotEmptyArray<T>>; | |
function isNotEmptyArray<T>(as: T[]): as is NotEmptyArray<T> { | |
return as.length > 0; | |
} |
import SwiftUI | |
/// Static properties for all preview devices. | |
/// | |
/// Usage: | |
/// | |
/// ```swift | |
/// struct TestView_Previews: PreviewProvider { | |
/// static var previews: some View { | |
/// Group { |
#!/usr/bin/env sh | |
# | |
# This script lints files for a Husky pre-commit hook | |
# | |
# run with `git commit -m "foo" 2>&1 | tee husky-errors.ignore.txt` | |
# to save the errors to a file. | |
# | |
# { | |
# "hooks": { |
package com.your.package | |
import android.app.Dialog | |
import android.os.Bundle | |
import com.your.package.R | |
import com.google.android.material.bottomsheet.BottomSheetDialog | |
import com.google.android.material.bottomsheet.BottomSheetDialogFragment | |
/** | |
* BottomSheetDialog fragment that uses a custom |
#!/usr/bin/env bash | |
set -e | |
addEntries() { | |
# check if universal access / custom menu key exists | |
if defaults read com.apple.universalaccess com.apple.custommenu.apps > /dev/null 2>&1; then | |
defaults delete com.apple.universalaccess com.apple.custommenu.apps | |
fi |
/* | |
* Copyright (C) 2017 The Android Open Source Project | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
Note: I'm not involved in Prepack in any way — please correct me if I say anything incorrect below!
A few people have asked me if Prepack and Svelte are similar projects with similar goals. The answer is 'no, they're not', but let's take a moment to explore why.
Prepack describes itself as a 'partial evaluator for JavaScript'. What that means is that it will run your code in a specialised interpreter that, rather than having some effect on the world (like printing a message to the console), will track the effects that would have happened and express them more directly.
So for example if you give it this code...
I made a little styling lib called glam
(some features are in development)
let's start off with the simplest use case. we'll make an 'index.html' page,
and assume we've setup our js bundler to output bundle.js