Skip to content

Instantly share code, notes, and snippets.

View jdan's full-sized avatar
🐫
- : int -> int -> int = <fun>

Jordan Scales jdan

🐫
- : int -> int -> int = <fun>
View GitHub Profile
#lang rosette
(require rackunit syntax/parse/define)
;; https://openai.com/blog/formal-math/
(define-simple-macro (prove e ...) (check-pred unsat? (verify (begin e ...))))
(test-case "Problem 1"
(define-symbolic* x p real?)
import SwiftUI
import PlaygroundSupport
// NOTE: this example currently only works with US-based coordinates
// constants
// New York
let latitude = 40.709335
let longitude = -73.956558
@marcysutton
marcysutton / chrome-a11y-experiment-instructions.md
Last active January 31, 2023 22:07
Enable Chrome Accessibility Experiment

NOTE: This is no longer an experiment! You can use the accessibility inspector in Chrome Devtools now, including a fantastic color contrast inspection tool. Read more: https://developers.google.com/web/updates/2018/01/devtools#a11y


Just like any good element inspector helps you debug styles, accessibility inspection in the browser can help you debug HTML and ARIA exposed for assistive technologies such as screen readers. There's a similar tool in Safari (and reportedly one in Edge) but I like the Chrome one best.

As an internal Chrome experiment, this tool differs from the Accessibility Developer Tools extension in that it has privileged Accessibility API access and reports more information as a result. You can still use the audit feature in the Chrome Accessibility Developer Tools, or you could use the aXe Chrome extension. :)

To enable the accessibility inspector in Chrome stable:

@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jamesmk
jamesmk / gist:3289782
Created August 7, 2012 22:02
js sluggify
var slugify = function(text) {
text = text.replace(/^\s+|\s+$/g, ''); // trim
text = text.toLowerCase();
// remove accents
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++) {
@loginx
loginx / gist:810311
Created February 3, 2011 22:04
Underscore.js mixin to emulate ruby's Array#each_slice method.
/**
* Underscore.js mixin to emulate Ruby's Enumerable#each_slice method.
* http://www.ruby-doc.org/core/classes/Enumerable.html#M001514
*
*/
_.mixin({
each_slice: function(obj, slice_size, iterator, context) {
var collection = obj.map(function(item) { return item; });