Skip to content

Instantly share code, notes, and snippets.


Ted M. Young tedyoung

View GitHub Profile
View quizdown-block.qd
Take a look at these two classes:
class Equity {
public Equity(String name) {
class Stock extends Equity {
import java.util.List;
import java.util.Scanner;
class BlockTokens {
public static void main(String[] args) {
String text = "Block one.\n" +
"Still part of block one.\n" +
"Yep, still part of block one.\n" +
"\n" +
tedyoung /
Last active Jun 19, 2019
replaceAll using DOTALL mode
String text =
"```\n" +
"public class Stock {\n" +
"\n" +
"}\n" +
text = text.replaceAll("(?s)```(.*?)```", "<pre>$1</pre>");
View Insert a progress bar to Powerpoint presentation .md


To view the progress of a Powerpoint presentation, a progress bar can be displayed at the bottom of the slide show.

How to proceed

Once the slideshow is complete, go to Tools > Macro > Visual Basic Editor.

In the new window, select Insert > Module and copy this text in the blank page:

Sub AddProgressBar()
    On Error Resume Next
tedyoung / gist:aca78496d424790bb0f19d36a4618f76
Created Mar 20, 2018 — forked from mallipeddi/gist:74274
Demonstrates the concepts of covariance and contravariance in the Java type system
View gist:aca78496d424790bb0f19d36a4618f76
import java.util.*;
* Covariance and contravariance.
* A type operator (an operator which takes as input a type and returns another type as output) is
* said to be
* 1) `covariant` if it preserves the ordering of types and orders types
* from more specific ones to more generic ones.
* 2) `contravariant` if it preserves the ordering of types and orders types
tedyoung / twitter.go
Created Oct 26, 2016 — forked from ScottMansfield/twitter.go
Twitter search utility
View twitter.go
package main
import (
tedyoung / sitdown.conf
Created Jan 24, 2014
Upstart script for restarting Node.js app when it exits unexpectedly
View sitdown.conf
description "SitDown server running on node.js"
start on startup
stop on shutdown
# respawn (restart) automatically -- try only 10 times
respawn limit 10 10
You can’t perform that action at this time.