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
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
#!/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
@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
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
\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
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
<?php | |
// MCAPI - patched by wridgers (https://github.com/wridgers) | |
// This patch makes the MCAPI OO friendly, and easy to integrate into projects like Symfony2. | |
namespace MailChimp; | |
class MCAPI { | |
public $version = "1.3"; | |
public $errorMessage; |
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
import android | |
import datetime | |
import json | |
import urllib | |
droid = android.Android() | |
# Configuration options | |
name = "YOUR_NAME" | |
weatherSearch = "A_CODE" # UK post code, US zip code, lat/lon |