Skip to content

Instantly share code, notes, and snippets.

View DavidSouther's full-sized avatar
💭
You can statistics syntax, not semantics.

David Souther DavidSouther

💭
You can statistics syntax, not semantics.
View GitHub Profile
public class fact2 {
public static int factorial(int x) {
if (x==0) return 1;
else return x * factorial (x-1);
}
public static void main() {
int i, gobble;
i = 0;
.assembly extern mscorlib {}
.assembly addnums {}
.method static void main()
{
.entrypoint
.maxstack 11
.locals init ( int32 )
ldc.i4.s 10
stloc.0
.assembly extern mscorlib {}
.assembly addnums {}
.method static void main()
{
.entrypoint
.maxstack 15
.locals init ( int32 )
// a = 10
ldc.i4.s 10
@DavidSouther
DavidSouther / functional_tests.py
Created September 18, 2016 16:00
Obey the Testing Goat on Nitrous
from pyvirtualdisplay import Display
from selenium import webdriver
display = Display(visible=0, size=(800, 600))
display.start()
browser = webdriver.Firefox()
browser.get('http://www.google.com')
print browser.title
browser.quit()
@DavidSouther
DavidSouther / overview.md
Last active April 4, 2016 02:00
Space Naval Sim

cc by-sa 3.0

OUTDATED

It now lives here.

Premise

Take command of a Stellar Naval Vessel (SNV) in a universe with physics from the CoDominium universe. Manage navigation, weapons, science, and more as you lead your crew on various missions ranging from military engagements to interstellar diplomacy to scientific exploration. Earn your place in the admiralty and take on larger missions, eventually controlling armadas and fleets at a galactic level.

<!DOCTYPE html>
<html>
<head>
<title>NOAA GOES NA Recent</title>
<style>
body {
margin: 0;
}
.container {
Rebase with unclean working directory
"unclean"
- staged changes
- unstaged changed
- untracked files
Accidental commit in middle of pull --rebase
Pulling commits out of a feature branch
[git-top-down]$ git hub-clone
/home/southerd/.ghf/bin/git-hub-clone <org/repo>: Initialize a new working repository, and set git-hubflow configurations.
<org/repo>: The organization and repository name to clone from.
[git-top-down]$ git hub-clone github-flow/recipes
Fork at https://github.com/DavidSouther/recipes
Project cloned into /home/southerd/devel/southerd/git-top-down/recipes
[git-top-down]$ cd recipes/
[recipes (master)]$ ls
README.md
    Workflows!
        Internals!
Tips & Tricks! 
  Resolving conflicts!
       Reading git output! 

Git - Top down!

// based on https://www.shadertoy.com/view/4dXGR4 by flight404, itself
// based on https://www.shadertoy.com/view/lsf3RH by trisomie21
float snoise(vec3 uv, float res) {
const vec3 s = vec3(1e0, 1e2, 1e4);
uv *= res;
vec3 uv0 = floor(mod(uv, res))*s;
vec3 uv1 = floor(mod(uv+vec3(1.), res))*s;