This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Tracer::writeScreenToBmp() | |
{ | |
// short == 2 bytes | |
// int == 4 bytes | |
struct BitMapFileHeader | |
{ | |
short magic; | |
int size; | |
short reserved1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[a4paper]{article} | |
% variables! for nice stuff. | |
\newcommand{\documentTitle}{TITLE OF YOUR DOCUMENT} | |
\newcommand{\documentAuthor}{YOUR NAME} | |
\newcommand{\documentDate}{\today} | |
% unicode please | |
\usepackage[utf8]{inputenc} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool Tracer::loadExampleScene() | |
{ | |
// render settings | |
// lighting settings | |
Tracer::useAmbientLighting(true); | |
Tracer::setAmbientLightingColour(Colour(255, 255, 255)); | |
Tracer::setAmbientLightingIntensity(0.05); | |
// lights |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Tracer::trace() | |
{ | |
// camera setup | |
Vector3 cameraLocation(0, 0, -800); | |
// light setup | |
double lightIntensity = 100.0; | |
Vector3 lightLocation(0, 500, 0); | |
for (int screenIndex = 0; screenIndex < Tracer::screenBufferSize; ++screenIndex ) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
setlocal EnableDelayedExpansion | |
set EXT_LIST=(c cpp css h hs js pl py sh xml log markdown md text txt conf json) | |
ftype txtfile="C:\Program Files (x86)\Vim\vim73\gvim.exe" --remote-silent "%%1" | |
for %%e in %EXT_LIST% do ( | |
assoc .%%e=txtfile | |
REG ADD "HKEY_CLASSES_ROOT\.%%e" /f /ve /d "txtfile" | |
REG ADD "HKEY_CLASSES_ROOT\.%%e" /f /v "Content Type" /d "text/plain" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import os, time, sys | |
now = time.time() | |
errorFiles = open('errors.txt', 'w') | |
playlist01days = open('Last 1 day.m3u', 'w') | |
playlist07days = open('Last 7 days.m3u', 'w') | |
playlist14days = open('Last 14 days.m3u', 'w') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PS D:\Dev\projects\john\bin> Measure-Command { .\debug\john.exe } | |
Days : 0 | |
Hours : 0 | |
Minutes : 0 | |
Seconds : 0 | |
Milliseconds : 600 | |
Ticks : 6008259 | |
TotalDays : 6.95400347222222E-06 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Goban(canvasElement) { | |
// size config | |
this.gridSize = 19; | |
this.gridWidth = 20; | |
// style config | |
this.styleStones = 'smooth'; | |
this.styleBoard = 'lightwood'; | |
// board style |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<tr> | |
<td> | |
<table border="0" class="comment-table" level="1" id="5293602"> | |
<tbody> | |
<tr> | |
<td style="border-right-width: 2px; border-right-style: solid; border-right-color: rgb(255, 102, 0);"><img src="/sslyc/images/s.gif" height="1" width="40" /></td> | |
<td valign="top"> | |
<center> | |
<a id="up_5293602" onclick="return vote(this)" href="vote?for=5293602&dir=up&by=&auth="> | |
<div class="up-arrow"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
echo 'git submodules...' | |
git submodule --quiet init | |
git submodule --quiet update | |
echo 'vim...'; cp ./vimrc ~/.vimrc | |
rm -rf ~/.vim | |
if [ ! -d ~/.vim/ ]; then |