Skip to content

Instantly share code, notes, and snippets.

View pmachapman's full-sized avatar

Peter Chapman pmachapman

View GitHub Profile
@pmachapman
pmachapman / beep.asm
Created September 9, 2014 22:54
Simple "beep" assembly routine. Compile with: debug < beep.asm
N BEEP.COM
A 100
MOV AH, 27
INT 21
MOV AH, 4C
INT 21
RCX
8
W
@pmachapman
pmachapman / yorn.asm
Created September 9, 2014 22:56
Simple "Y or N" assembly routine for MS-DOS 5 or below. Compile with: debug < yorn.asm
N YORN.COM
A 100
MOV AH, 08
INT 21
CMP AL, 59
JZ 0116
CMP AL, 79
JZ 0116
CMP AL, 6E
JZ 0116
@pmachapman
pmachapman / alfred.bas
Created September 10, 2014 06:26
Alfred E. Neuman graphic for Commodore 64/128 from Australian Mad No. 274
10 POKE 53280, 6: POKE 53281, 6
20 PRINT CHR$(147)
30 FOR C = 0 TO 63
40 READ BYTE
50 POKE 832 + C, BYTE
60 NEXT C
70 POKE 2040, 13
80 POKE 53287, 1
90 POKE 53248, 50: POKE 53249, 100: POKE 53264, 0
100 POKE 53269, 1
@pmachapman
pmachapman / Fix OneDrive in Notepad++
Created March 10, 2015 00:57
Fixes OneDrive support in Notepad++ after updating to the latest OneDrive. Be sure to change the UserFolder value to your OneDrive directory.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Microsoft\SkyDrive]
"UserFolder"="C:\\Users\\Administrator\\OneDrive"
@pmachapman
pmachapman / biosdate.bas
Last active August 29, 2015 14:17
Displays your BIOS date
10 DEF SEG=&HF000
20 FOR X=&HFFF5 TO &HFFFF
30 PRINT CHR$(PEEK(X));
40 NEXT
@pmachapman
pmachapman / strfuncs.bas
Created April 3, 2015 02:23
How To Simulate Visual Basic 6.0 String Functions in VB4
Option Explicit
Public Const vbTextCompare = 1
Public Const vbBinaryCompare = 0
Public Function Join(source() As String, Optional sDelim) As String
Dim sOut As String, iC As Integer
If IsMissing(sDelim) Then
sDelim = " "
End If
@pmachapman
pmachapman / DisableVbHtml.cs
Last active August 29, 2015 14:18
Disables the VBHTML and WebForm view engines for ASP.NET MVC
// -----------------------------------------------------------------------
// <copyright file="DisableVbHtml.cs" company="Conglomo">
// Copyright 2015 Peter Chapman. Code in Public Domain.
// </copyright>
// -----------------------------------------------------------------------
namespace Conglomo.Website
{
using System;
using System.Linq;
@pmachapman
pmachapman / ReportingServices.js
Created April 8, 2015 22:01
Fix SSRS 2012 in Chrome (Append this to C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js)
function pageLoad() {
var element = document.getElementById('ctl32_ctl09');
if (element) {
element.style.overflow = 'visible';
}
}
@pmachapman
pmachapman / Gmail SGML Test.vbs
Created April 16, 2015 03:48
Gmail SGML Character Test Script
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "SGML Test Message"
objMessage.From = "yourname@gmail.com"
objMessage.To = "yourname@gmail.com"
objMessage.HTMLBody = "<h1>This is an SGML test.</h1><p>You should not see: &nbsp</p>"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 ' cdoSendUsingPort
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "smtp.gmail.com"
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465
objMessage.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1
objMessage.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = 1
@pmachapman
pmachapman / test.js
Last active August 29, 2015 14:19
Modular Javascript Example
// The object will be called test
var test = (function () {
// Use strict mode for JavaScript parsing
// The browser uses this
"use strict";
// Global Variables - JSLint stuff...
/*global $*/
/*global utilities*/