Skip to content

Instantly share code, notes, and snippets.

Jordan Pittman thecrypticace

Block or report user

Report or block thecrypticace

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thecrypticace / colors.swift
Created Dec 1, 2018
Tailwind Colors interpreted as Display P3 converted to sRGB
View colors.swift
// Why?
// Figma (as of this writing) doesn't have color management
// As a result of this when using hex values intended for sRGB the colors end up much richer on a P3 display
// If you throw them into a color managed browser you're not going to get what you expect. It'll look washed out.
// This is a best approximation of the colors by interpeting as Display P3 and converting to sRGB
// Some colors are not fully representable (and are marked as such by noting which channels were clipped)
// h/t to Marc Edwards for pointing me in the right direction on how to do this. Thanks!
import Cocoa
View gist:391888088b806dae7a871caf905bcec1
=== RUN TestNextToken
=== RUN TestNextToken/{,}
=== RUN TestNextToken/{a,}
=== RUN TestNextToken/{ab,c}
=== RUN TestNextToken/{1..10}
=== RUN TestNextToken/{1...10}
panic: runtime error: slice bounds out of range [recovered]
panic: runtime error: slice bounds out of range
goroutine 24 [running]:
View imap-fetch.php
use Fetch\Server;
$server = new Server("", 993);
$server->setAuthentication("", "mypassword");
$server->setParam("DISABLE_AUTHENTICATOR", ["PLAIN"]);
thecrypticace / settings.json
Last active Oct 23, 2017
VSCode Integrated Terminal Customizations
View settings.json
"workbench.colorCustomizations": {
"terminalCursor.foreground": "#fee381",
"terminal.selectionBackground": "#cb392e",
"terminal.background": "#0d151b",
"terminal.foreground": "#ffffff",
"terminal.ansiBlack": "#3c444d",
"terminal.ansiBlue": "#266b85",
"terminal.ansiBrightBlack": "#515d68",
"terminal.ansiBrightBlue": "#329dcc",
View Combinations.php
class Combinations
public static function unique($values, $minLength = 1, $maxLength = null)
// $combinations is an array of [["a"], ["a"], … ["a", "b"], ["a", "b", "c"], …]
// The array may not be sorted. Each internal array IS sorted.
// Keys produced by the generator are sequential but shouldn't matter
thecrypticace / InteractsWithExceptionHandling.php
Last active Mar 6, 2017
Enhanced version of exception handler replacement
View InteractsWithExceptionHandling.php
namespace Tests\Concerns;
use Exception;
use Throwable;
use App\Exceptions\Handler;
use Illuminate\Contracts\Debug\ExceptionHandler;
trait InteractsWithExceptionHandling
thecrypticace / fix-yarn
Last active Jan 22, 2017
Fix yarn transitive dependency binaries
View fix-yarn
#!/usr/bin/env php
file_exists("node_modules/.bin") || mkdir("node_modules/.bin");
foreach (glob("../*/bin/*") as $file) {
if (! is_executable($file)) {
View tokens.php
$entries = json_decode(file_get_contents("whatever.json"), true);
$tokensPerEntry = array_map(function ($entry) {
return $entry["requirements"]["others"];
}, $entries);
$tokens = array_merge([], ...$tokensPerEntry);

Keybase proof

I hereby claim:

  • I am thecrypticace on github.
  • I am thecrypticace ( on keybase.
  • I have a public key ASDCy4Hw5zzX0ThF5TzoFIAtbdyFB-79Wfk6cJ2pnCAGzgo

To claim this, I am signing this object:

You can’t perform that action at this time.