- Settings -> Windows Update
- Install all updates
- launch Windows Powershell as administrator and execute:
State machines are everywhere in interactive systems, but they're rarely defined clearly and explicitly. Given some big blob of code including implicit state machines, which transitions are possible and under what conditions? What effects take place on what transitions?
There are existing design patterns for state machines, but all the patterns I've seen complect side effects with the structure of the state machine itself. Instances of these patterns are difficult to test without mocking, and they end up with more dependencies. Worse, the classic patterns compose poorly: hierarchical state machines are typically not straightforward extensions. The functional programming world has solutions, but they don't transpose neatly enough to be broadly usable in mainstream languages.
Here I present a composable pattern for pure state machiness with effects,
Download emacs-w64 and extract somewhere, e.g. a tools
or apps
folder like C:\Users\<user>\tools\emacs
.
Emacs and many other applications store its configuration in the user's "home" folder. Translated directly from the Unix world, that is %UserProfile%
(C:\Users\<user>
), but Windows prefers %AppData%
instead (C:\Users\<user>\AppData\Roaming
).
For simplicity's sake, override this by specifying the HOME
environment variable explicitly. Emacs and some other applications (e.g. MinGW) lets this override the default.
#!/bin/bash | |
### | |
### my-script — does one thing well | |
### | |
### Usage: | |
### my-script <input> <output> | |
### | |
### Options: | |
### <input> Input file to read. | |
### <output> Output file to write. Use '-' for stdout. |
#!/bin/bash | |
# Added after beta and doing it at a catalina machine. | |
# App Store > macOS Catalina > GET | |
# Steps to create the macOS Catalina (10.15) VM: | |
# login to developer.apple.com or beta.apple.com to download a tester's profile for your OS. Install it. | |
# Go to System Preferences > Software Update and start the update process | |
# When the Catalina Installer (few MBytes) is started, it downloads the remain part of installation. |
// Now if you adding a domain with wildcard A record, Cloudflare uses strange scan, which added a 1000 trash domains (like 1-100, some english words like "ai", "air", "android"). | |
// There's no way to bulk delete it, you can delete it only using their API. | |
// So I write a script that can help you with this problem. | |
// Discussions about same problem: | |
// https://community.cloudflare.com/t/delete-all-records-using-api/13410/2 | |
// https://community.cloudflare.com/t/bulk-delete-dns-record/89540 | |
const settings = { | |
email: 'your@email', |
#!/bin/bash | |
# This script builds the iOS and Mac openSSL libraries | |
# Download openssl http://www.openssl.org/source/ and place the tarball next to this script | |
# Credits: | |
# https://github.com/st3fan/ios-openssl | |
# https://github.com/x2on/OpenSSL-for-iPhone/blob/master/build-libssl.sh | |
/** | |
* Will return version from properties file and replace -SNAPSHOT by GIT commit hash | |
* to recognize origin commit for the every build. | |
*/ | |
project.ext.evalVersionName = { | |
def ideBuild = project.properties['android.injected.invoked.from.ide'] | |
if (ideBuild) { | |
logger.info("IDE build"); | |
return "dev" | |
} else if (project.VERSION.toUpperCase().contains("SNAPSHOT")) { |
function interval(duration, fn){ | |
this.baseline = undefined | |
this.run = function(){ | |
if(this.baseline === undefined){ | |
this.baseline = new Date().getTime() | |
} | |
fn() | |
var end = new Date().getTime() | |
this.baseline += duration |
Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:
NB: Check out git subtree
/git submodule
and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.
Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.