Skip to content

Instantly share code, notes, and snippets.

🏳️‍🌈
Rockin' the Open Web

Emma Rose arcrose

🏳️‍🌈
Rockin' the Open Web
Block or report user

Report or block arcrose

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
@arcrose
arcrose / chart.html
Created Jun 27, 2019
Security portfolio chart
View chart.html
<!doctype html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/Chart.js/2.8.0/Chart.min.js"></script>
</head>
<body>
<div style="width: 60%; margin-left: auto; margin-right: auto;">
<canvas id="myChart" width="400" height="400"></canvas>
<script>
var ctx = document.getElementById('myChart').getContext('2d');
@arcrose
arcrose / auth.go
Created Aug 8, 2018
Proposal authentication API for MIG
View auth.go
package auth
// AuthSchemeId is used to identify authentication schemes supported by MIG.
type AuthSchemeId string
// Fingerprint is a details-agnostic identifier for a key.
// Implementations of `CryptoAuth` will store keys and which one should be used
// to produce or verify a signature can be specified by indicating the fingerprint
// of the key to use.
type Fingerprint string
View capability_authorities.rs
use std::marker::PhantomData;
pub trait Capability<Operation> {
type Data;
type Error;
fn perform(&self, Operation) -> Result<Self::Data, Self::Error>;
}
pub trait Authority<Request> {
View code-kata-parsing.clj
(ns spacemacs-test.core)
(require '[clojure.string :as str])
; Want to parse strings like the following into some data structure that describes each game.
; E.g. Game 1, team 1 = Los Angeles Clippers, score 1 = 104, team 2 = Dallas Mavericks, score 2 = 88, winner = team 1
(def *example-input* "Los Angeles Clippers 104 Dallas Mavericks 88,New York Knicks 101 Atlanta Hawks 112,Indiana Pacers 103 Memphis Grizzlies 112, Los Angeles Clippers 100 Boston Celtics 12")
(defn- tokenize-game-reports [report-sheet]
(str/split report-sheet #","))
@arcrose
arcrose / 1dec1.rs
Last active Dec 2, 2017
Answers to the Advent of Code challenges
View 1dec1.rs
// Answer to challenge 1 for Advent of Code 2017 on December 1
const MY_INPUT: &str = "INPUT GOES HERE";
/// Creates a vector where each element is a single digit taken from the input string, in order.
///
/// `input` is expected to be a string of digits in base 10.
///
/// # Panics
@arcrose
arcrose / Cargo.toml
Last active Apr 27, 2017
Rust JSON API Client With Error Handling
View Cargo.toml
[package]
name = "jsontest"
version = "0.1.0"
authors = ["Zack Mullaly <zsck@riseup.net>"]
[dependencies]
serde = "^1.0"
serde_json = "^1.0"
serde_derive = "^1.0"
@arcrose
arcrose / .eslintrc.json
Created Mar 15, 2017
A Correctness-Oriented ESLint Configuration
View .eslintrc.json
{
"env": {
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"rules": {
"array-bracket-spacing": [
"error",
"never"
View keybase.md

Keybase proof

I hereby claim:

  • I am zsck on github.
  • I am zsck (https://keybase.io/zsck) on keybase.
  • I have a public key whose fingerprint is 4AD7 D615 D697 C911 C5CD 71E1 FA1F 4329 33DB AD6E

To claim this, I am signing this object:

@arcrose
arcrose / howaboutno.py
Last active Jun 23, 2016
A python script to stick it to the man
View howaboutno.py
#! /usr/bin/env python
import sys
import urllib
import webbrowser
urljoin = None
try:
# Python 2
@arcrose
arcrose / nodejs4celebration.js
Created Sep 10, 2015
Playing with some of the new ES6 features supported in JS as of Node.js v4.0
View nodejs4celebration.js
"use strict";
let fs = require('fs');
// ARROW FUNCTIONS!!!
console.log([1,2,3].map(x => x * x));
fs.readFile('./es6.js', (err, content) => console.log(content));
fs.readFile('./es6.js', (err, content) => {
return console.log(content);
});
You can’t perform that action at this time.