Skip to content

Instantly share code, notes, and snippets.

View knutaf's full-sized avatar

knutaf

View GitHub Profile
@knutaf
knutaf / debatoid.js
Created May 10, 2011 14:14
tally up votes for debatoid
(function() {
function TallyVotes()
{
var candidates =
[
["STEEZY", "STEEZYXL"],
["EPRAHIM"]
];
var comments = document.querySelectorAll(".comment-even, .comment-odd");
@knutaf
knutaf / binding_of_isaac_joy2key
Created June 25, 2014 07:53
joy2key binding (get it!?) for binding of isaac
[General]
FileVersion=53
NumberOfJoysticks=1
DisplayMode=3
UseDiagonalInput=0
UsePOV8Way=0
Threshold=250
Threshold2=610
KeySendMode=0
[Joystick 1]
@knutaf
knutaf / stream_info
Last active January 13, 2017 05:12
More info about whatever knutaf is currenty streaming
Currently working on:
Advent of Code day 19, part 1: https://adventofcode.com/2016/day/18
my code: https://github.com/knutaf/advent2016
https://drawings.jvns.ca/networking/
https://drawings.jvns.ca/mac-address/
https://drawings.jvns.ca/dns/
https://drawings.jvns.ca/packet/
https://drawings.jvns.ca/tcp-1/
https://drawings.jvns.ca/layers/
https://drawings.jvns.ca/ipv6/
https://drawings.jvns.ca/nat/
use std::io::Read;
fn main() {
for b in std::io::stdin().bytes() {
let val = b.unwrap();
match val {
0xd => println!(""),
0xa => (),
_ => println!("{:#02x}", val),
}
}

Top row but split

If white is on top and outer side color matches outer edge color - target the edge piece. do R or L' to put it in the back, second layer. U2 to put the corner piece in the back-left or back-right corner, then undo with R' or L.

If white is on top and outer side color is opposite the outer edge color - target the corner piece. R U R' to put it in the back-left or back-right corner with white now on the side.

Special cases for top row adjacents

A W A - move corner over the edge, then U'

A B A - rotate side so that corner is over the edge, then U2

How many yellow corners are oriented correctly already?

Only 1

Rotate top until solved corner is on the front and you can also see yellow on the other front corner, facing you.

Do "Sune" - R U R' U R U2 R'. Target the unsolved corner. Take that corner's f2l slot out. Rotate U one away. Then put it back using a U2 move.

No corners done

If 2 yellow headlights facing front and 2 facing back

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.