Example of an automated script that does most of this: https://github.com/surpher/PactSwiftMockServer/blob/fb8148866bb05f49a0b1dcaae66c67bad1e7eca7/Support/build_rust_dependencies
curl https://sh.rustup.rs -sSf | sh
/** | |
* TypeScript currently lacks a way of typing a record of keys only but not values. | |
* we need this because we want an object of typed keys but we want to leave the values inferred. | |
* thankfully, we can do this with generics. This function allows the second generic's values to be inferred | |
* so that our object is fully type safe for hugely complex types, but we can guarantee that all the keys we need exist. | |
* It's not perfect, but it gets the job done for the time being | |
*/ | |
export function ensureKeys<T>() { | |
/** | |
* Function that returns the value that gets put in, values are type-safely inferred |
Example of an automated script that does most of this: https://github.com/surpher/PactSwiftMockServer/blob/fb8148866bb05f49a0b1dcaae66c67bad1e7eca7/Support/build_rust_dependencies
curl https://sh.rustup.rs -sSf | sh
import Combine | |
final class Keyboard: ObservableObject { | |
// MARK: - Published Properties | |
@Published var state: Keyboard.State = .default | |
// MARK: - Private Properties |
// | |
// UIScrollViewWrapper.swift | |
// lingq-5 | |
// | |
// Created by Timothy Costa on 2019/07/05. | |
// Copyright © 2019 timothycosta.com. All rights reserved. | |
// | |
import SwiftUI |
{ | |
"version": 2, | |
"name": "PROJECT_NAME_HERE", | |
"alias": [ | |
"YOUR_ALIASES_HERE" | |
], | |
"routes": [ | |
{ | |
"src": "/", | |
"headers": { |
Run each of the following lines, replacing yourdomain.com
and AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
with your details:
export NOW_DOMAIN=yourdomain.com
export GOOGLE_VERIFICATION=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
now dns add "$NOW_DOMAIN" @ TXT "google-site-verification=$GOOGLE_VERIFICATION"
now dns add "$NOW_DOMAIN" @ MX ASPMX.L.GOOGLE.COM 1
now dns add "$NOW_DOMAIN" @ MX ALT1.ASPMX.L.GOOGLE.COM 5
now dns add "$NOW_DOMAIN" @ MX ALT2.ASPMX.L.GOOGLE.COM 5
now dns add "$NOW_DOMAIN" @ MX ALT3.ASPMX.L.GOOGLE.COM 10
https://twitter.com/snookca/status/1073299331262889984?s=21
Happy to chat about this. There’s an obvious disclaimer that there’s a cost to css-in-js solutions, but that cost is paid specifically for the benefits it brings; as such it’s useful for some usecases, and not meant as a replacement for all workflows.
(These conversations always get heated on twitter, so please believe that I’m here to converse, not to convince. In return, I promise to listen to you too and change my opinions; I’ve had mad respect for you for years and would consider your feedback a gift. Also, some of the stuff I’m writing might seem obvious to you; I’m not trying to tell you if all people of some of the details, but it might be useful to someone else who bumps into this who doesn’t have context)
So the big deal about css-in-js (cij) is selectors.
// ==UserScript== | |
// @name twitter-activity-tweets-remover | |
// @namespace http://arashmilani.com/ | |
// @version 0.1 | |
// @description Twitter "activity tweets" remover | |
// @author Arash Milani | |
// @match https://*twitter.com/* | |
// @grant none | |
// ==/UserScript== |
function isOk(input) { | |
if (Array.isArray(input)) return input.length > 0; | |
if (typeof input === 'object' && input) return Object.keys(input).length > 0; | |
if (typeof input === 'number') return true; | |
return Boolean(input); | |
} |
In this talk I'd like to use 5 minutes of my time to explain to the audience why jQuery is simply way better than React.
fadeIn()
method? Nah, I don't think so. You need to install a react-transition-group package which weighs over 3GB.$.get(https://stackoverflow.com/questions/12345/adding_two_numbers_javascript)
in React? NOPE.And many, many more.
(This is a completely serious lightning talk proposal, I promise.)