Skip to content

Instantly share code, notes, and snippets.

aki michiakig

  • Rent the Runway
  • Brooklyn, NY
Block or report user

Report or block michiakig

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
View private.xml
<?xml version="1.0"?>
<root>
<item>
<name>Change Command-P to Up arrow</name>
<identifier>private.command_p_to_up_arrow</identifier>
<autogen>
__KeyToKey__
KeyCode::P, ModifierFlag::COMMAND_L,
KeyCode::CURSOR_UP
</autogen>
View Color.java
package com.example.helloworld.core;
public enum Color {
BLUE,
GREEN
}
View gist:9880618
import java.util.*;
public class TypeSafety {
public static void main(String[] args){
List<Set<?>> listOfWildcardSet = new ArrayList<Set<?>>();
listOfWildcardSet.add(new HashSet<String>());
listOfWildcardSet.add(new HashSet<Integer>());
listOfWildcardSet.set(0, listOfWildcardSet.get(0));
listOfWildcardSet.set(1, listOfWildcardSet.get(1));
View gist:6610073
signature POSITIONAL_STREAM =
sig
type elem
type stream
val peek : stream -> (elem * stream) option
val getPos : stream -> pos
end
structure SubstringStream : STREAM =
View Lexer.java
import java.util.List;
import java.util.ArrayList;
/*
* Lexical analyzer for Scheme-like minilanguage:
* (define (foo x) (bar (baz x)))
*/
public class Lexer {
public static enum Type {
// This Scheme-like language has three token types:
View monoid.ml
type 'a monoid = {zero : 'a; plus : 'a -> 'a -> 'a}
let sum (m : 'a monoid) (l : 'a list) : 'a = List.fold_left m.plus m.zero l
let string_summer = sum {zero = ""; plus = (^)}
let int_summer = sum {zero = 0; plus = (+)}
View gist:5710149
#lang eopl
;(module lang (lib "eopl.ss" "eopl")
(require "drscheme-init.scm")
(provide (all-defined))
;;;;;;;;;;;;;;;; grammatical specification ;;;;;;;;;;;;;;;;
(define the-lexical-spec
View gist:5427929
utahraptor:~ aki$ rlwrap ocaml
Objective Caml version 3.12.1
# #use "topfind";;
- : unit = ()
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
View gist:5366826
#!/usr/bin/emacs --script
(princ (format "batch mode: %s\n" noninteractive))
View gist:5366269
(defun ext (cmd args)
(with-temp-buffer
(let ((exit (funcall 'call-process cmd nil (current-buffer) nil args)))
(cons exit (buffer-substring (point-min) (point-max))))))
You can’t perform that action at this time.