Skip to content

Instantly share code, notes, and snippets.

View vermiculus's full-sized avatar
🙃
I may be slow to respond.

Sean Allred vermiculus

🙃
I may be slow to respond.
View GitHub Profile
@vermiculus
vermiculus / ReversePriorityQueue.java
Created November 5, 2012 02:22
Reverse Priority Queue (Example 4 for Alan)
import java.util.Comparator;
import java.util.PriorityQueue;
// Write a program that takes in 10 integers via command-line and prints them out in reverse natural order using a PriorityQueue. (this should use a Comparator)
public class ReversePriorityQueue
{
public class Reverse implements Comparator<Integer>
{
public int compare(Integer arg0, Integer arg1)
{
@vermiculus
vermiculus / Line.c
Created February 17, 2013 19:23
Basic OOC
// heh
@vermiculus
vermiculus / Line.c
Last active December 13, 2015 20:58
Marissa's Classes -- a transcription a Facebook chat with an extraordinarily clever girl who deserves a higher level of self-esteem and confidence.
#include <stdlib.h>
#include "Line.h"
int getLength (Line *l) {
return l->p2->x - l->p1->x;
}
Line* NewLine(void) {
Line *l = (Line*) malloc (sizeof (Line));
[cl-struct-request-response nil nil nil nil nil "https://api.stackexchange.com/2.1/questions?order=desc&sort=activity&site=stackoverflow" nil (:params ((order . "desc") (sort . "activity") (site . "stackoverflow")) :parser json-read :success (lambda (&rest --cl-rest--) "
(fn &key DATA &allow-other-keys)" (let* ... ...)) :error (closure (t) (&rest args) (apply ... ... args)) :url "https://api.stackexchange.com/2.1/questions?order=desc&sort=activity&site=stackoverflow" :response #0) #<buffer *request curl*> nil nil ...]
REQUEST [error] Error from parser json-read: (json-readtable-error)
REQUEST [error] Error (parse-error) while connecting to https://api.stackexchange.com/2.1/questions.
\documentclass[a4paper,10pt]{memoir}
% Popular choices for CVs/resumes are curve, moderncv, and (you
% guessed it) res. However, I often find it easier to start from
% scratch -- these documents especially are made to taste, if you
% will.
\makeatletter % makes the symbol @ usable in a command sequence. This
% is sort of just saying to an end-user of whatever
% you're writing 'hey, don't go messing with this unless
% you kinda sorta know what you're doing'
@vermiculus
vermiculus / tex-electric-ret.el
Last active December 17, 2015 13:28
Provides functionality for diff-friendly, phrase-based TeX editing by inserting comment characters smartly
(local-set-key
(kbd "RET")
(lambda () (interactive)
(if (= 37 (char-before (1- (point))))
(progn (delete-backward-char 2) (TeX-newline) (TeX-newline))
(if (= 10 (char-before (1- (point))))
(progn (TeX-newline) (indent-for-tab-command))
(if (= 10 (char-before))
(progn (insert "%") (TeX-newline))
(progn (TeX-newline) (indent-for-tab-command)))))))
\documentclass[12pt]{memoir}
\usepackage[english]{babel}
\usepackage{graphicx}
%\usepackage{chancery}
%\usepackage[T1]{fontenc}
\usepackage{oesch}
\usepackage[paperwidth=6in,paperheight=4in,margin={1cm,1cm}]{geometry}
\documentclass[convert={density=3000,
size=1080x800,
outext=.png},
border=1cm]{standalone}
\usepackage{fontspec}
\setmainfont{Zapfino}
\pagestyle{empty}
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.Serialization.Formatters.Binary;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
\documentclass{article}
\usepackage{xparse,expl3,environ}
\ExplSyntaxOn
\NewEnviron{save}[1]{
\tl_new:c { saved_text__#1 }
\tl_set:cv { saved_text__#1 } {
\BODY
}
}