Retry a command until it fails.
Debugging brittle specs is annoying and time consuming work. Let's automate finding those brittle specs by retrying them until they fail.
Accompanying blog post.
| """ | |
| The most atomic way to train and run inference for a GPT in pure, dependency-free Python. | |
| This file is the complete algorithm. | |
| Everything else is just efficiency. | |
| @karpathy | |
| """ | |
| import os # os.path.exists | |
| import math # math.log, math.exp |
| -- bayer.lua v1.0 | |
| -- by Potch | |
| -- MIT License | |
| -- hard-code smallest bayer | |
| local bayer2 = { [0] = 0x0, [1] = 0x2, [2] = 0x3, [3] = 0x1 } | |
| -- t should be a 64 entry table of 1 and 0s, indexed at 0 | |
| -- returns a 1-indexed table of bytes for use with playdate.graphics.setPattern | |
| local function toBytes(t) |
Retry a command until it fails.
Debugging brittle specs is annoying and time consuming work. Let's automate finding those brittle specs by retrying them until they fail.
Accompanying blog post.
| [CmdletBinding()] | |
| Param( | |
| [Parameter(Mandatory=$True,Position=1)] | |
| [string]$bumpKind | |
| ) | |
| function getVersion() { | |
| $tag = Invoke-Expression "git describe --tags --always 2>&1" | |
| $tag = $tag.Split('-')[0] |
| using System; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Threading.Tasks; | |
| using Microsoft.AspNetCore.Authentication.Cookies; | |
| using Microsoft.AspNetCore.Authorization; | |
| using Microsoft.AspNetCore.Http; | |
| using Microsoft.AspNetCore.JsonPatch; | |
| using Microsoft.AspNetCore.Mvc; | |
| using My.Dal; |
Any top-level comment on pull request ought be tagged with one of four emojis:
❓ for a non-blocking comment that asks for clarification. The pull request author must answer the question before the pull request is merged, but does not have to wait for the comment author to re-review before merging.
🎨 for a non-blocking comment that proposes a refactor or cleanup. The pull request author does not have to address the comment for the pull request to merge.
Request Changes review, and is responsible for re-reviewing once the pull request author has addressed the issue.
😻 for a comment that compliments the author for their work.
| /* | |
| A simple little SCSS mixin for creating scrim gradients | |
| Inspired by Andreas Larson - https://github.com/larsenwork | |
| https://css-tricks.com/easing-linear-gradients/ | |
| */ | |
| @mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') { | |
| $scrimCoordinates: ( |
| # Generate a BaseSystem.dmg with 10.13 Install Packages | |
| hdiutil attach /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -mountpoint /Volumes/highsierra | |
| hdiutil create -o /tmp/HighSierraBase.cdr -size 7316m -layout SPUD -fs HFS+J | |
| hdiutil attach /tmp/HighSierraBase.cdr.dmg -noverify -mountpoint /Volumes/install_build | |
| asr restore -source /Applications/Install\ macOS\ 10.13\ Beta.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase | |
| cp -R /Volumes/highsierra/Packages /Volumes/OS\ X\ Base\ System/System/Installation | |
| hdiutil detach /Volumes/OS\ X\ Base\ System/ | |
| hdiutil detach /Volumes/highsierra/ | |
| mv /tmp/HighSierraBase.cdr.dmg /tmp/BaseSystem.dmg |
File > New > Project...
Create a Package.swift file in your root project directory, add dependencies, then run swift package fetch on the command line in the same directory. We’re not going to run swift build because it will just complain.
Here are some simple ways to make your PICO-8 code fit in 140 280 characters (as in the #tweetjam #tweetcart craze). I did not invent these, I merely observed and collected them from the tweetjam thread.
x=.1 and x=.023, not x=0.1 or x=0.023x=1/3 is shorter than x=.3333circ(x,y,1)pset(z,q,7) works just as well