Skip to content

Instantly share code, notes, and snippets.

Avatar
🙃
I may be slow to respond.

Sean Allred vermiculus

🙃
I may be slow to respond.
View GitHub Profile
@vermiculus
vermiculus / ReversePriorityQueue.java
Created Nov 5, 2012
Reverse Priority Queue (Example 4 for Alan)
View ReversePriorityQueue.java
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
Last active Dec 13, 2015
Marissa's Classes -- a transcription a Facebook chat with an extraordinarily clever girl who deserves a higher level of self-esteem and confidence.
View Line.c
#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));
View gist:5050463
[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.
View ankoch.tex
\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 Dec 17, 2015
Provides functionality for diff-friendly, phrase-based TeX editing by inserting comment characters smartly
View tex-electric-ret.el
(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)))))))
View foot.tex
\documentclass[12pt]{memoir}
\usepackage[english]{babel}
\usepackage{graphicx}
%\usepackage{chancery}
%\usepackage[T1]{fontenc}
\usepackage{oesch}
\usepackage[paperwidth=6in,paperheight=4in,margin={1cm,1cm}]{geometry}
View logo.tex
\documentclass[convert={density=3000,
size=1080x800,
outext=.png},
border=1cm]{standalone}
\usepackage{fontspec}
\setmainfont{Zapfino}
\pagestyle{empty}
View stuff.cs
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;
View save.tex
\documentclass{article}
\usepackage{xparse,expl3,environ}
\ExplSyntaxOn
\NewEnviron{save}[1]{
\tl_new:c { saved_text__#1 }
\tl_set:cv { saved_text__#1 } {
\BODY
}
}