(Also see [remarkable][], the markdown parser created by the author of this cheatsheet)
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'; | |
import 'dart:math' as math; | |
import 'dart:async'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
// This widget is the root of your application. | |
@override | |
Widget build(BuildContext context) { |
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
<body></body> | |
<script src="http://gamingJS.com/Three.js"></script> | |
<script src="http://gamingJS.com/ChromeFixes.js"></script> | |
<script src="http://gamingJS.com/Tween.js"></script> | |
<script> | |
var scene = new THREE.Scene(); | |
var width = window.innerWidth - 20; | |
var height = window.innerHeight - 20; |
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
/** | |
* Force directed graph layout algorithm according to Fruchterman and Reingold's principle. | |
* The algorithm can be summarized as follows: | |
* algorithm SPRING(G:graph); | |
* place vertices of G in random locations; | |
* repeat N times | |
* calculate the force on each vertex; | |
* move the vertex c4 | |
* draw graph on canvas, plotter or any drawing tool. | |
* |
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
<!-- | |
Author: <Anthony Sychev> (hello at dm211 dot com | a.sychev at jfranc dot studio) | |
Buy me a coffe: https://www.buymeacoffee.com/twooneone | |
Untitled-1 (c) 2022 | |
Created: 2022-01-25 20:06:02 | |
Desc: Attach some dom element on the bottom of screen as absolute, triggered to move on resize address bar. | |
--> | |
<html> |
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'; | |
import 'package:vector_math/vector_math_64.dart' hide Colors; | |
void main() { | |
final controller = WidgetCanvasController([ | |
WidgetCanvasChild( | |
key: UniqueKey(), | |
offset: Offset.zero, | |
size: const Size(400, 800), | |
child: Scaffold( |
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
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" -o -z "$1" ]; then cat <<EOF | |
appify v3.0.1 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
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
# disable sleep | |
sudo pmset -b sleep 0; sudo pmset -b disablesleep 1 | |
# re-enable sleep | |
sudo pmset -b sleep 5; sudo pmset -b disablesleep 0 |