Navigation Menu

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
@doersino
doersino / backup_tumblr.sh
Last active January 15, 2022 23:32
Simple way of backing up one or multiple Tumblr blogs to date-prefixed folders; downloads and removes required software (except Python) automatically. http://neondust.tumblr.com/post/97723922505/simple-tumblr-backup-script-for-mac-os-x-and-linux
#!/bin/bash
# http://neondust.tumblr.com/post/97723922505/simple-tumblr-backup-script-for-mac-os-x-and-linux
# https://gist.github.com/doersino/7e3e5db591e42bf543e1
# BLOGS is a space-separated list of the blogs you want to backup. You can omit
# the ".tumblr.com" part if you want.
BLOGS="neondust.tumblr.com aufgeloest.tumblr.com hejlisten.tumblr.com"
# OUT is the directory where the backups will be stored. For each blog, a date-
# prefixed subdirectory will be created here.
#!/bin/bash
#
# Faster toolchain build: skips as much as possible.
#
# To use this toolchain from the command line:"
# export TOOLCHAINS=$(whoami)
#
# we build to the same prefix every time (instead of building
# to a versioned prefix) because every time the prefix changes
# *everything* rebuilds.
@trouttdev
trouttdev / SparkPost.md
Last active November 16, 2016 08:20
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.

CC

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 to_address@domain.com and CCing it to cc_address@domain.com, the header_to for cc_address@domain.com will need to be set to to_address@domain.com
  2. Add the email to the CC headers option in content object. If you have multiple emails, these should be comma separated.
@khanlou
khanlou / MD5StringTest.swift
Last active April 12, 2019 09:18
MD5 and SHA1 on String in Swift 3
import XCTest
@testable import <#project#>
class StringMD5Test: XCTestCase {
func testMD5() {
let string = "soroush khanlou"
XCTAssertEqual(string.md5, "954d741d14b14002d1ba88f600eee635")
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
@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>
@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)
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
}
@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/:
@khanlou
khanlou / ArchiveCurrent.applescript
Last active February 2, 2018 13:05
Notes.applescripts
tell application "Notes"
move front note to folder "Archive"
end tell