Skip to content

Instantly share code, notes, and snippets.

View KatrinaHoffert's full-sized avatar

Katrina Mitchell KatrinaHoffert

View GitHub Profile
@KatrinaHoffert
KatrinaHoffert / DisplayPromptExample.java
Last active December 25, 2015 03:38
A Java example of a prompt in the bottom right corner of the screen.
import java.awt.Dimension;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.JButton;
import java.util.Scanner;
class Calculator
{
private double firstNumber = 0;
private double secondNumber = 0;
private String operation = null;
private String expression = null;
public double stepByStep() throws NumberFormatException
<div class="ad-container" title="">
<div class="ad" title="">
<a href="http://meta.skeptics.stackexchange.com/ads/ct/2586?url=http%3a%2f%2fskeptics.stackexchange.com%2f%3ftab%3dfeatured" rel="nofollow" target="_blank" title=""><img src="http://stack-exchange-dynamic-ads.herokuapp.com/bounty.png" alt="Current Skeptics Stack Exchange bounties" title="" width="220" height="250" style=""></a>
</div>
<div class="footer-container">
<div class="footer" style="top: 0px;">
6 votes · <a href="http://meta.skeptics.stackexchange.com/questions/2570#2586" title="click to comment on this ad" target="_blank">comment</a> · <a href="http://meta.skeptics.stackexchange.com/ads/display/2570" target="_blank">stats</a>
</div>
</div>
</div>
// This file is part of Glest (www.glest.org)
//
// Copyright (C) 2001-2008 Martiño Figueroa
//
// You can redistribute this code and/or modify it under
// the terms of the GNU General Public License as published
// by the Free Software Foundation; either version 2 of the
// License, or (at your option) any later version
// ==============================================================
#!/usr/bin/env bash
#
# By Mike Hoffert. Based on build-kernel.sh in OS161.
#
# Alternative build script. Only errors are shown. Will automatically
# configure the script.
#
# Usage:
# ./build-kernel2 <kernel-name> [options]
#
#!/usr/bin/env bash
#
# By Mike Hoffert. Based on clean-kernel.sh in OS161.
#
# Does a better job of removing unnecessary files. Will reset the build number
# that OS161 thinks it is (if you don't like this, remove the line that deletes
# src/defs.mk).
#
# You will have to re-run conf-kernel.sh after running this (and rebuild, of
# course). If you use my other script, build-kernel2.sh, this script should only
@KatrinaHoffert
KatrinaHoffert / aaa.h
Created November 24, 2014 02:53
Demonstration of include guards -- before include guards
int foo();
@KatrinaHoffert
KatrinaHoffert / aaa.h
Created November 24, 2014 03:03
Demonstration of include guards -- now with include guards
#ifndef _AAA_H_
#define _AAA_H_
int foo();
#endif
@KatrinaHoffert
KatrinaHoffert / .Instructions_for_vimrc.md
Last active August 29, 2015 14:10
My current .vimrc file

This is my .vimrc file. Just install it to ~/.vimrc. I've tested this on Windows with Cygwin's MinTTY and on Linux with Konsole.

In order to use it, you'll need to make a few other changes.

##Plugins

In order for the plugins to work, you'll have to install Vundle as described here. You'll probably only have to do steps 2 and 4. Step 1 is just getting Git (which you probably already have) and step 3 is already done. vim-airline is the part that really makes it look pretty.

##Fonts

/*jshint multistr:true */
text = "Blah blah blah blah blah blah Eric \
blah blah blah Eric blah blah Eric blah blah \
blah blah blah blah blah Eric";
var myName = "Eric";
var hits = [];