Skip to content

Instantly share code, notes, and snippets.

View actaneon's full-sized avatar

Josh King actaneon

  • Get Satisfaction
  • San Francisco, CA
View GitHub Profile
@actaneon
actaneon / .gitignore
Created July 21, 2009 19:51
.gitignore
log
database.yml*
obj
bin
deploy
deploy/*
_ReSharper.*
*.csproj.user
*.vbproj.user
*.resharper.*
@actaneon
actaneon / JavascriptPrototype.html
Created July 8, 2009 20:23
Javascript Prototype Example
<html>
<body>
<span id="main" />
<script>
function Circle(radius) {
this.PI = 3.141592654;
this.radius = radius;
this.Diameter = function() {
@actaneon
actaneon / SQLDateConvert.txt
Created July 7, 2009 14:59
MSSQL Date Conversions
Fmt Standard Input/Output
------------------------------------------------
100 Default mon dd yyyy hh:mi(AM/PM)
101 US mm/dd/yyyy
108 - hh:mi:ss
112 ISO yymmdd
114 - hh:mi:ss:mmm
120 ODBC Canonical yyyy-mm-dd hh:mi:ss
121 ODBC Canonical yyyy-mm-dd hh:mi:ss.mmm
For /F "tokens=1*" %%a In ('date /T') Do Set Date=%%a %%b
REM MM/DD/YYYY
Set PrintDate=%Date:~4,10%
REM YYYYMMDD
Set FileDate=%Date:~10,4%%Date:~4,2%%Date:~7,2%
REM HH:MM:SS.MS
Set PrintTime=%Time%
@actaneon
actaneon / UniformBrowserTextSize.css
Created June 30, 2009 19:53
Uniform Browser Text Size
body {
font-size:100%;
line-height:1.125em; /* 16×1.125=18 */
}
.bodytext p {
font-size:0.875em;
}
.sidenote {
public string SplitPascalCase(string s)
{
return System.Text.RegularExpressions.Regex.Replace(s, "([a-z](?=[A-Z])|[A-Z](?=[A-Z][a-z]))", "$1 ");
}