Skip to content

Instantly share code, notes, and snippets.

Brian Schwind bschwind

Block or report user

Report or block bschwind

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
View frame_data.csv
151.859507ms audio 121
161.878684ms audio 121
171.838729ms audio 121
181.788916ms audio 121
191.833415ms audio 121
201.781046ms audio 121
211.774527ms audio 121
221.781544ms audio 121
231.819408ms audio 121
241.818812ms audio 121
View rust_ios_bitcode.sh
# Lifted from https://news.ycombinator.com/item?id=14305084
% cat test.rs
fn main() {
println!("Hello, world!");
}
% rustc --emit llvm-bc -C lto test.rs
% LIB=$HOME/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib
% xcrun --toolchain XcodeDefault clang -o test test.bc ~/.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc-ea49ffd3fee5264c.rlib
warning: overriding the module target triple with x86_64-apple-macosx10.12.0 [-Woverride-module]
View MainActivity.java
package com.bschwind.bottombarnativetest;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.ShapeDrawable;
import android.graphics.drawable.shapes.OvalShape;
import android.os.Bundle;
import android.support.annotation.NonNull;
import android.support.design.widget.BottomNavigationView;
View promises.js
readFile("filename.txt", function(err, data) {
console.log("5 seconds have elapsed");
if (err) { return; }
readFile("otherfile.txt", function(err, data) {
console.log("10 seconds have elapsed");
if (err) { return; }
writeFileToNetwork(data, function(err, response) {
if (err) { return; }
console.log("complete");
View upload.js
"use strict";
var BUCKET_NAME = process.env.BUCKET;
var crypto = require("crypto");
var jwt = require("jsonwebtoken");
var logger = require("services/logger").getLogger("general");
var mime = require("mime-types");
var moment = require("moment");
var uuid = require("node-uuid");
@bschwind
bschwind / gist:8495883
Created Jan 18, 2014
Building a stroke tree for a particular character
View gist:8495883
package com.skritter.utils;
import com.skritter.models.Param;
import com.skritter.models.Stroke;
import com.skritter.models.StrokeData;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
View gist:7915491
find . -name *.png -o -name *.jpg -exec cp {} . \;
@bschwind
bschwind / NetworkBuffer.cs
Created Apr 14, 2012
Network Buffer for organizing network stream data
View NetworkBuffer.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace GraphicsToolkit.Networking
{
/// <summary>
/// This class helps organize the data required for
/// reading and writing to a network stream
@bschwind
bschwind / Server.cs
Created Apr 14, 2012
Implements a simple TCP server with one thread per client
View Server.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net;
using System.Net.Sockets;
using System.Threading;
using System.Collections.Concurrent;
namespace GraphicsToolkit.Networking
You can’t perform that action at this time.