Skip to content

Instantly share code, notes, and snippets.

Demo:

Spoiler warning

Spoiler text. Note that it's important to have a space after the summary tag. You should be able to write any markdown you want inside the <details> tag... just make sure you close <details> afterward.

console.log("I'm a code block!");
' $DYNAMIC
DEFINT A-Z
DECLARE SUB GLoad (FileName AS STRING, GLoadArray() AS INTEGER)
DECLARE SUB GSave (x1 AS SINGLE, y1 AS SINGLE, x2 AS SINGLE, y2 AS SINGLE, FileName AS STRING)
DECLARE SUB DoWarHead ()
DECLARE SUB DrawWarHead (X AS INTEGER, Y AS INTEGER)
DECLARE SUB DoLasers ()
DECLARE SUB AddLaser (X AS INTEGER, Y AS INTEGER, Speed AS INTEGER, typ AS INTEGER, c AS INTEGER)
DECLARE SUB KillLaser (ID AS LONG)
DECLARE SUB PlayGame ()
@vratiu
vratiu / .bash_aliases
Last active May 5, 2024 19:46
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@keyle
keyle / sample.spritefont
Created October 26, 2013 01:55
A simple of a .spritefont file - which is really an xml file - used to compile fonts in XNA and MonoGame.
<?xml version="1.0" encoding="utf-8"?>
<XnaContent xmlns:Graphics="Microsoft.Xna.Framework.Content.Pipeline.Graphics">
<Asset Type="Graphics:FontDescription">
<FontName>Segoe UI Mono</FontName>
<Size>14</Size>
<Spacing>0</Spacing>
@zeffii
zeffii / edge_length_addon.py
Last active March 18, 2024 23:50
preliminary_edge_length addon
bl_info = {
"name": "Edge sum",
"author": "zeffii",
"version": (0, 1, 0),
"blender": (2, 7, 7),
"location": "3d view, N panel",
"description": "Adds edge sum box to Mesh Display.",
"wiki_url": "",
"tracker_url": "",
"category": "3D View"}
@jlong
jlong / uri.js
Created April 20, 2012 13:29
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
@oberhamsi
oberhamsi / minimal-gamejs.js
Created February 16, 2011 19:55
a minimal gamejs app
// Minimal is the smalles GameJs app I could think of, which still shows off
// most of the concepts GameJs introduces.
//
// It's a pulsating, colored circle. You can make the circle change color
// by clicking.
//
// Play: <http://gamejs.org/apps/minimal/>
var gamejs = require('gamejs');