Skip to content

Instantly share code, notes, and snippets.

rsms / Makefile
Last active May 14, 2021
Demonstrates a method for remote rendering with Skia. First run, then make and finally ./remote-render
View Makefile
SRCROOT := $(shell pwd)
SYSTEM := $(shell uname -s)
OBJDIR := .build
SKIA_DIR := skia
# skia-compatible config sourced from skia/out/Release/obj/
# via temporarily configuring Skia with skia_enable_tools=true
View StringScanner.swift
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 / viewimage.user.js
Last active Apr 11, 2021
Userscript version of the View Image chrome extension
View viewimage.user.js
// ==UserScript==
// @name View Image
// @namespace
// @version 3.4.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
View ArchiveCurrent.applescript
tell application "Notes"
move front note to folder "Archive"
end tell
forresto / dynamicland-vneck-tshirt.lua
Last active Aug 30, 2018
first shot at dynamicland #softfab
View dynamicland-vneck-tshirt.lua
-- 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/:
View NilError.swift
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
ReneHollander / main.cpp
Created Dec 29, 2016
Skia on the Raspberry Pi
View main.cpp
#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>
View gist:8de90a6ebe9f08933bc94c6ab18d1bfd
A Visual Introduction to Machine Learning
UC Berkeley CS188 Intro to AI -- Course Materials
Eyeo 2016 – Gene Kogan
khanlou / MD5StringTest.swift
Last active Apr 12, 2019
MD5 and SHA1 on String in Swift 3
View MD5StringTest.swift
import XCTest
@testable import <#project#>
class StringMD5Test: XCTestCase {
func testMD5() {
let string = "soroush khanlou"
XCTAssertEqual(string.md5, "954d741d14b14002d1ba88f600eee635")
trouttdev /
Last active Nov 16, 2016
How to add CC and BCC fields to SparkPost API

How to send a SparkPost email via API with a CC and BCC

Originally I found this which only vaguely pointed me in the right direction, so I thought I'd create a gist of what ended up working for me.


To add a CC address, you have to two two things

  1. Add the address to your recipeints array, and set the header_to value to an address in the to field. So if you're sending the email to and CCing it to, the header_to for will need to be set to
  2. Add the email to the CC headers option in content object. If you have multiple emails, these should be comma separated.