Skip to content

Instantly share code, notes, and snippets.

Avatar
:shipit:
Ship it

Tony Arcieri tarcieri

:shipit:
Ship it
View GitHub Profile
@tarcieri
tarcieri / aarch64_sha256.rs
Created Apr 3, 2021
core::simd-based SHA-256 implementation using ARMv8 Cryptography Extensions
View aarch64_sha256.rs
#![feature(stdsimd)]
// Based on the following C intrinsics implementation:
// <https://github.com/noloader/SHA-Intrinsics/blob/master/sha256-arm.c>
//
// Original C written and placed in public domain by Jeffrey Walton.
// Based on code from ARM, and by Johannes Schneiders, Skip Hovsmith and
// Barry O'Rourke for the mbedTLS project.
use core::arch::aarch64::*;
@tarcieri
tarcieri / acid_house.rb
Created Mar 20, 2020
Sonic Pi Acid House
View acid_house.rb
use_bpm 128
live_loop :kick do
sample :bd_808, amp: 10
sleep 1
end
live_loop :snare do
sleep 1
sample :drum_snare_soft
View vermillion.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tarcieri
tarcieri / blinky_basic.rs
Created Mar 5, 2019
NeoTrellis M4 Rust blinky_basic example
View blinky_basic.rs
#![no_std]
#![no_main]
extern crate cortex_m;
extern crate trellis_m4 as hal;
extern crate panic_halt;
extern crate smart_leds;
extern crate smart_leds_trait;
extern crate ws2812_timer_delay as ws2812;
View async.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tarcieri
tarcieri / experimental.svg
Created Apr 21, 2017
DANGER: EXPERIMENTAL
View experimental.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View lifetime_hell_part_2.rs
use std::marker::PhantomData;
pub trait MyTrait<'a> {
fn new() -> Self;
fn derpity(&'a self);
}
struct Derp;
impl<'a> MyTrait<'a> for Derp {
@tarcieri
tarcieri / lifetime_hell.rs
Created Oct 31, 2016
Generics, traits, and lifetimes, oh my!
View lifetime_hell.rs
pub trait MyTrait<'a> {
fn foo(n: &'a i32);
}
struct Derp;
impl<'a> MyTrait<'a> for Derp {
fn foo(n: &'a i32) {
}
}
@tarcieri
tarcieri / example.fling
Created Jun 14, 2015
Example fling configuration
View example.fling
-----BEGIN ENCRYPTED FLING CONFIGURATION-----
FTTKvMlxv0rs0ACBydlXFHZHYmKQtRUN6PlwI4ZW5gYXV57u/zO90KRD0Nn2
Buj3/CsJGgbWx5fM2X8eGJKRryuZ7eNSm9C0doq2lRikrqV+gsBNqa0e/lkc
P4b8q7GfZyralBwvMTBnoOhmUtNPM1orafFIhSYI6wN2ZKpnZgAar9NQRkxZ
LJWTvqzlWVdZ6ranCzmRJhAClr7822GylXIIeOycpm8EC8ESRRmiaYMJMPxe
3BBlk1KuTTnU4WVDbJVW/9f9+zcZViZDUTyNt5LougR8LLC8FbN1p+UiLSWx
CZA940Mo/DVWN29uJL8FitY8mJDZEJ8/OJr/5zptzAFaj0zhs+uLafjvI96D
------END ENCRYPTED FLING CONFIGURATION------
@tarcieri
tarcieri / gist:95f41af8751e765f5ac2
Created Apr 29, 2015
rails-assets.org's 4096-bit DH breaks JRuby :(
View gist:95f41af8751e765f5ac2
Using /Users/tonyarcieri/.rvm/gems/jruby-1.7.19
$ gem install rails-assets-jruby --source "https://rails-assets.org"
ERROR: While executing gem ... (Java::JavaLang::RuntimeException)
Could not generate DH keypair