Skip to content

Instantly share code, notes, and snippets.

#include "Graph.h"
#include "PriorityQueue.h"
void PrintPath(int start, int end, int *parents, int *distance) {
cout << end << " (" << distance[end] << "): ";
int a = start;
int b = end;
while (a != b) {
cout << b << " -> ";
b = parents[b];
@basicxman
basicxman / football_one.sh
Created August 7, 2011 06:00
Code Kata in Bash or "I get crazy at 2AM"
#!/bin/bash
# http://codekata.pragprog.com/2007/01/kata_four_data_.html
awk '{print (($7 - $9) < 0 ? -($7 - $9) : $7 - $9) " " $2}' football.dat | grep -P "[A-Za-z_]{2,}" | sort -n | head -n 1 | awk '{print $2}'

#r/Yoga Information Hub

When in doubt, use the search engine in the sidebar to look through older posts. There are plenty of posts on getting into yoga, coming into yoga from injuries, etc.

##Getting Into Yoga

At Home

function love.conf(t)
t.screen.width = 400
t.screen.height = 700
end
Hexagon = {}
function Hexagon:new(x, y, height)
obj = {}
setmetatable(obj, self)
self.__index = self
obj.x = x
obj.y = y
obj.height = height
package team2200.smartdashboard.extension.rectangletracker;
import edu.wpi.first.smartdashboard.camera.LaptopExtension;
import edu.wpi.first.smartdashboard.properties.BooleanProperty;
import edu.wpi.first.smartdashboard.properties.NumberProperty;
import edu.wpi.first.smartdashboard.types.DataType;
import edu.wpi.first.wpijavacv.WPIBinaryImage;
import edu.wpi.first.wpijavacv.WPIColor;
import edu.wpi.first.wpijavacv.WPIColorImage;
import edu.wpi.first.wpijavacv.WPIContour;
class WebGL
getWebGLContext: (id) ->
elm = document.getElementById(id)
ctx = elm.getContext("webgl") || elm.getContext("experimental-webgl")
getShader: (id) ->
shaderScript = document.getElementById(id)
theSource = shaderScript.textContent
if shaderScript.type == "x-shader/x-fragment"
shader = @gl.createShader(@gl.FRAGMENT_SHADER)
http = require("http")
fs = require("fs")
port = undefined
readPort = ->
fs.readFile "port", (err, data) ->
port = Number(data)
readPort()
#!/bin/bash
# Usage:
# To include everything, do not stage beforehand or pass arguments.
# Otherwise, stage what you wish to include beforehand and/or pass an argument
# here for git add.
#
# Examples:
# deploy-working #=> Stages everything (git add .) and deploys
#
sass: sass --watch game.scss:game.css
coffee: ./compile