Skip to content

Instantly share code, notes, and snippets.

View jackie-scholl's full-sized avatar

Jackie Scholl jackie-scholl

View GitHub Profile
#lang slideshow
(require slideshow/code)
(require data/maybe)
(require print-debug/print-dbg)
(require rebellion/streaming/reducer)
; 'X and 'O
@jackie-scholl
jackie-scholl / Sudoku.hs
Created September 24, 2019 15:22
A Sudoku representation and solver, by Jackie Scholl
module Main where
import qualified Data.List as L
import qualified Data.Map as M
import qualified Data.Set as S
import Debug.Trace (trace)
-- (row, column)

Keybase proof

I hereby claim:

  • I am raptortech-js on github.
  • I am jscholl (https://keybase.io/jscholl) on keybase.
  • I have a public key whose fingerprint is 28C8 F497 7365 2817 6597 8068 4DA4 671F A833 461F

To claim this, I am signing this object:

@jackie-scholl
jackie-scholl / OAuthCallbackServer.java
Created May 4, 2013 02:47
I wrote a server in 90 lines (it only handles OAuth callbacks).
package scholl.both.analyzer.social;
import java.io.*;
import java.net.*;
/**
* An HTTP server.
*
* NOTE: I modified this from http://fragments.turtlemeat.com/javawebserver.php
*
#include <stdio.h> // Import the standard I/O library
int main(int m, char**g){ // m is the argument count, g is the argument array
int i, n, x=1; // x iterates over g, i is used in two for loops, n is used for ADDn and SUBTRACTn
while(x<m){
char *f=g[x++], l=*f, *a=g[x++], *b=g[f[1]&2? x++:x]; // f is the function, l is the first character thereof, a is the first operand, b is the second operand. Increment x if required.
if (l==68) { // DIVIDE
for(i=0; i<8; i++) putchar(a[i%4]); // Print first four characters twice
printf(" and "); // Print " and "
for(i=0; i<8; i++) putchar(a[i|4]); // Print second four characters twice
} else for(i=0; i<8; i++)
public class Out{ public static void main(String[] g){
for(int h=1; h<g.length; h+=2)
System.out.println(g[h-1].charAt(0)==68?g[h].substring(0,4)+g[h].substring(0,4)+" and "+g[h].substring(4)+g[h]
.substring(4):g[h-1].charAt(0)==65?g[h].substring(0,g[h-1].charAt(3)-48)+g[h].substring(0,g[h-1].charAt(3)-48)
+g[h].substring(g[h-1].charAt(3)-48,56-g[h-1].charAt(3)):g[h-1].charAt(0)==83?g[h].substring(g[h-1].charAt(8)
-48, 56-g[h-1].charAt(8))+g[h].substring(56-g[h-1].charAt(8))+g[h].substring(56-g[h-1].charAt(8)):g[h-1].charAt
(0)==85?g[h].substring(4)+g[++h].substring(0,4):g[h-1].charAt(0)==73?g[h].substring(0,2)+g[h].substring(6)+g[+
+h].substring(0,2)+g[h].substring(6):"X");
}}