Skip to content

Instantly share code, notes, and snippets.

View Noia's full-sized avatar

Emily Soldal Noia

View GitHub Profile
#include "planck.h"
#include "action_layer.h"
#include "muse.h"
extern keymap_config_t keymap_config;
#define _BL 0
#define _FN1 1
#define _FN2 2
#define KC_ KC_TRNS
@Noia
Noia / Roshambo.java
Created September 30, 2012 15:37
Just helpin'
import java.util.Random;
import java.util.Scanner;
/**
* A program to play Roshambo against a human
*
* Using methods to create a better structure.
*
* @author Paul Mahlis
* @version 1
@Noia
Noia / AutoCalc.java
Created September 9, 2012 01:08 — forked from anonymous/AutoCalc.java
AutoCalc by joshellis625
import java.util.Scanner;
/**
* I have not compiled this, so I make no promises that I will work as expected...
*/
public class AutoCalc {
private int x = 0, y = 0;
private final Scanner scanner = new Scanner(System.in);
@Noia
Noia / Example.java
Created August 9, 2012 13:43
Slice example clone
/**
* Example usage.
*/
class Example {
public static void main(String[] args) {
String example = "foo/bar/baz";
Slice<String> s = new Slice<>(example.split("/"));
}
import java.util.Collection;
import java.util.Iterator;
/**
* A simple collection similar to Go's built-in notion of "slices".
*
* These are essentially bounded array objects with an immutable underlying store. Appending and
* inserting elements requires a new backing store to be allocated, but slicing out a contiguous
* subset just creates a new Slice that references the existing backing store.
*
@Noia
Noia / Check.java
Created June 25, 2012 11:19
Check.java
package jnk.emily;
import com.google.common.base.Preconditions;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
/**
* @author Emily
* @created 23. des. 2011
*/
@Noia
Noia / AggregationExample1.java
Created April 20, 2012 11:46
AggregationExample1
**
* @author Emily Soldal
* @created 20. apr. 2012
*/
public class AggregationExample1 {
public static void main(String[] args) {
Iterable<Car> cars = getCars();
Ordering<Car> ordering = Ordering.natural().onResultOf(Address.ZipCodeAccessor.instance)
@Noia
Noia / AllEqualOrdering.java
Created April 19, 2012 17:12
Ordering.allEqual()
/*
* Copyright (C) 2011 The Guava Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@Noia
Noia / Deleter.java
Created February 6, 2012 09:25
Axioms of persistence
public interface Deleter<I,U> {
boolean delete(I in, U origin);
}
@Noia
Noia / MoreMaps.java
Created February 5, 2012 21:34
MoreMaps.java
import static com.google.common.base.Preconditions.*;
import static com.google.common.collect.Iterables.*;
import java.io.Serializable;
import java.util.Map;
import java.util.Map.Entry;
import com.google.common.base.Function;
import com.google.common.base.Functions;
import com.google.common.collect.ImmutableMap;