Skip to content

Instantly share code, notes, and snippets.

@anka-213
anka-213 / SketchSystems.spec
Last active April 14, 2020 16:08 — forked from ryanlucas/SketchSystems.spec
Animated Button
Animated Button
Go
click -> Loading
Loading
successful -> Success
failure -> Error
Success
reset -> Go
Error
reset -> Go
@anka-213
anka-213 / SketchSystems.spec
Last active April 14, 2020 16:00 — forked from rgraves-aspiration/SketchSystems.spec
Aspiration App Logic
Aspiration App Logic
open app from home screen -> Has User Previously Logged In?
Logged Out Flow
Has User Previously Logged In?
yes -> Is Device Authentication Set Up?
no -> App Welcome Screen
App Welcome Screen
tap login -> Is Device Authentication Set Up?
@anka-213
anka-213 / surfingkeys.js
Created June 15, 2017 18:39 — forked from karlredman/surfingkeys.js
my surfingkeys.js (google chrome surfingkeys extension configuration)
// an example to create a new mapping `ctrl-y`
/*
mapkey('<Ctrl-y>', 'Show me the money', function() {
Front.showPopup('a well-known phrase uttered by characters in the 1996 film Jerry Maguire (Escape to close).');
});
*/
// an example to replace `u` with `?`, click `Default mappings` to see how `u` works.
map('?', 'u');
@anka-213
anka-213 / surfingkeys.js
Last active June 15, 2017 19:06 — forked from karlredman/surfingkeys.js
my surfingkeys.js (google chrome surfingkeys extension configuration)
// My settings:
if (window.location.origin === "https://www.duckduckgo.com") {
unmap('h');
unmap('j');
unmap('k');
unmap('l');
}
@anka-213
anka-213 / playground.rs
Created October 12, 2016 20:10 — forked from anonymous/playground.rs
Shared via Rust Playground
#[derive(Debug)]
struct I(i32);
macro_rules! p {
($e:expr) => (println!("{:30}: {:?}", stringify!($e), $e));
}
trait PrefixStuff {
@anka-213
anka-213 / playground.rs
Created September 27, 2016 20:57 — forked from anonymous/playground.rs
Shared via Rust Playground
#![feature(unboxed_closures)]
#![feature(fn_traits)]
#[derive(Clone)]
struct Foo (i32);
type Bar = i32;
impl Foo {
fn go(&self, _: &i32) { }
@anka-213
anka-213 / playground.rs
Created September 27, 2016 00:46 — forked from anonymous/playground.rs
Shared via Rust Playground
#![feature(unboxed_closures)]
#![feature(fn_traits)]
#[derive(Clone)]
struct Pr {
pat: i32 //, mat: Matcher<'a,'a>
}
type MState = i32;
@anka-213
anka-213 / reuse_buf.rs
Last active September 24, 2016 18:22 — forked from anonymous/playground.rs
(un)Safe reusable buffers
//#![feature(question_mark)]
use std::ops::Deref;
use std::ops::DerefMut;
#[derive(Debug, Default)]
struct ReuseBuf {
inner: Vec<u32>,
used: bool
}
@anka-213
anka-213 / defer.rs
Created June 3, 2016 17:23 — forked from anonymous/playground.rs
Shared via Rust Playground
macro_rules! defer {
($x:expr) => {
let _x = {
struct Deferred<F: Fn()>(F);
impl<F: Fn()> Drop for Deferred<F> {
fn drop(&mut self) {
self.0();
}
}
@anka-213
anka-213 / playground.rs
Created May 12, 2016 22:44 — forked from anonymous/playground.rs
Shared via Rust Playground
#![allow(dead_code)]
#![allow(unused_variables)]
#![allow(unused_mut)]
struct Asdf(i32, Option<Gc<Asdf>>);
struct Gc<T>(*const T);
impl<T> Drop for Gc<T> {
fn drop(&mut self) {