-
Moomins
-
Ihmisten puolue (more on the channel):
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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return const MaterialApp( | |
home: MyWidget(), | |
); |
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
// Persist the scope window's position across restarts (by default, | |
// it always starts centered on the screen on each restart). | |
// | |
// Usage | |
// ----- | |
// | |
// Open the Stethoscope in your startup file, e.g. | |
// | |
// s.scope; | |
// |
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
/// All the ways to zip. | |
/// | |
/// The Swift standard library doesn't seem to have a way to cycle an element so | |
/// that it can be paired with something else in a zip. These are the ways I've | |
/// found to achieve the same effect. The last one, `.map({($0, z)})` might be | |
/// the most idiomatic Swift (and is also the shortest one to express in Swift). | |
let xs = [1, 2, 3] | |
let y = 1...10 |
Last verified to work with Xcode 15.1.
Ten years later and I still find myself doing this on a new machine. I'd written a script and gist-ed it earlier to save myself time on new machines, but that script and gist got lost to the sands of time, so here's another one.
Open
~/Library/Developer/Xcode
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP --> | |
<!-- <meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self'; style-src 'self' 'unsafe-inline'"> --> | |
<title>Stream</title> | |
</head> | |
<body> | |
<button id="send">Send</button><br/> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Paths</title> | |
</head> | |
<body> | |
<input type="file" /> | |
<script> | |
const input = document.querySelector("input") |