Skip to content

Instantly share code, notes, and snippets.

View jbrennan's full-sized avatar
😅
bestie please let me merge

Jason Brennan jbrennan

😅
bestie please let me merge
View GitHub Profile
@MarkBennett
MarkBennett / installing-ruby-2.5.1-on-m1.md
Last active March 23, 2024 10:21
Installing Ruby 2.5 on Mac M1
@rsms
rsms / Makefile
Last active February 28, 2024 01:31
Demonstrates a method for remote rendering with Skia. First run build-skia-macos.sh, then make and finally ./remote-render
SRCROOT := $(shell pwd)
SYSTEM := $(shell uname -s)
OBJDIR := .build
SKIA_DIR := skia
SOURCES := remote-render.cc
# skia-compatible config sourced from skia/out/Release/obj/remote_demo.ninja
# via temporarily configuring Skia with skia_enable_tools=true
@harlanhaskins
harlanhaskins / StringScanner.swift
Last active August 4, 2020 23:45
Swift String Scanner
import Foundation
/// `StringScanner` is a fast scanner for Strings and String-like objects.
/// It's used to extract structured bits from unstructured strings, while
/// avoiding making extra copies of string bits until absolutely necessary.
/// You can build Scanners over Substrings, allowing you to scan
/// parts of strings and use smaller, more specialized scanners to extract bits
/// of that String without needing to reuse another scanner.
public struct StringScanner<Input: StringProtocol> {
let input: Input
@bijij
bijij / viewimage.user.js
Last active March 3, 2024 16:28
Userscript version of the View Image chrome extension
// ==UserScript==
// @name View Image
// @namespace https://github.com/bijij/ViewImage
// @version 4.1.1
// @description This userscript re-implements the "View Image" and "Search by image" buttons into google images.
// @author Joshua B
// @run-at document-end
// @include http*://*.google.tld/search*tbm=isch*
// @include http*://*.google.tld/imgres*
// @updateURL https://gist.githubusercontent.com/bijij/58cc8cfc859331e4cf80210528a7b255/raw/viewimage.user.js
@khanlou
khanlou / ArchiveCurrent.applescript
Last active February 2, 2018 13:05
Notes.applescripts
tell application "Notes"
move front note to folder "Archive"
end tell
@forresto
forresto / dynamicland-vneck-tshirt.lua
Last active August 30, 2018 06:44
first shot at dynamicland #softfab
-- Shirt (#softfab)
Claim (you) has state "waist" with initial value (30).
Claim (you) has state "arm" with initial value (5).
Claim (you) has state "armaround" with initial value (10).
Claim (you) has state "side" with initial value (20).
Claim (you) has state "neck" with initial value (15).
When (you) contains dots /dots/,
(you) has width /width/:
public struct NilError: Error, CustomStringConvertible {
let file: String
let line: Int
public init(file: String = #file, line: Int = #line) {
self.file = file
self.line = line
}
@mbuchetics
mbuchetics / json.swift
Created June 30, 2017 09:28 — forked from reckenrode/json.swift
Decoding arbitrary JSON with the new Decoder in Swift 4
enum JSON: Decodable {
case bool(Bool)
case double(Double)
case string(String)
indirect case array([JSON])
indirect case dictionary([String: JSON])
init(from decoder: Decoder) throws {
if let container = try? decoder.container(keyedBy: JSONCodingKeys.self) {
self = JSON(from: container)
@ReneHollander
ReneHollander / main.cpp
Created December 29, 2016 16:08
Skia on the Raspberry Pi
#include <iostream>
#include <assert.h>
#include <stdio.h>
#include <cstdio>
#include <bcm_host.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <GLES2/gl2ext.h>
Links:
A Visual Introduction to Machine Learning
http://www.r2d3.us/visual-intro-to-machine-learning-part-1/
UC Berkeley CS188 Intro to AI -- Course Materials
http://ai.berkeley.edu/home.html
Eyeo 2016 – Gene Kogan
https://vimeo.com/180044029