Skip to content

Instantly share code, notes, and snippets.

View sinclairtarget's full-sized avatar
💭
Not an editor command: waaaaaaaa

Sinclair Target sinclairtarget

💭
Not an editor command: waaaaaaaa
View GitHub Profile
@sinclairtarget
sinclairtarget / fish.sim
Last active February 21, 2022 15:18
Simula Demonstration
Simulation Begin
! We will use this as input to Normal() below ;
Integer seed;
! Utility method for logging messages along with the current simulation
time ;
Procedure log(message); Text message; Begin
OutFix(Time, 2, 0);
OutText(": " & message);
OutImage;
@sinclairtarget
sinclairtarget / 1-cat-pdp7.s
Last active April 2, 2024 20:15
cat through the ages
" cat
lac 017777 i " Load accumulator (AC) with argument count
sad d4 " Skip next if we have more than 4 words of args
jmp nofiles " Otherwise, jump to nofiles
lac 017777 " Load AC with address of args
tad d1 " Increment AC by 1, past argument count
tad d4 " Increment AC by 4, now AC points to first real arg
dac name " Save arg pointer from AC into 'name'
@sinclairtarget
sinclairtarget / bernoulli.c
Created August 17, 2018 20:22
Lovelace's Note G Program in C
#include <stdio.h>
/*
* Calculates what Ada Lovelace labeled "B7", which today we would call the 8th
* Bernoulli number.
*/
int main(int argc, char* argv[])
{
// ------------------------------------------------------------------------
// Data
@sinclairtarget
sinclairtarget / Program.cs
Created June 14, 2018 14:28
HttpClient Test
using System;
using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Reflection;
using System.Runtime.InteropServices;
namespace dotnet_console
{
class Program
@sinclairtarget
sinclairtarget / bg_api.md
Last active December 1, 2017 16:55
BG API Request and Response

Client Lookup Endpoint

This endpoint takes a first name, last name, or nickname (or any combination of those) and returns a list of matching clients. You should use this endpoint to allow users of your app to search for a client.

Example 1

HTTP Request:

GET api.breakingground.org/clients/lookup?firstName="John"&lastName="Doe"&nickname="Red Cat"
@sinclairtarget
sinclairtarget / BasicGradient.shader
Created January 25, 2016 03:04
Simple Gradient Shader
Shader "Custom/BasicGradient"
{
Properties
{
_TopColor ("Top Color", Color) = (1, 1, 1, 1)
_BottomColor ("Bottom Color", Color) = (1, 1, 1, 1)
_RampTex ("Ramp Texture", 2D) = "white" {}
}
SubShader
@sinclairtarget
sinclairtarget / tic_tac_toe.rb
Created December 5, 2015 20:29
Tic Tac Toe Code Now
require 'tic_tac_toe_cn'
game = Tic_Tac_Toe.new
puts "Starting Tic Tac Toe"
# part 1
puts "Player 1, choose X or 0"
player_one = gets.chomp
@sinclairtarget
sinclairtarget / hobbit.rb
Created December 5, 2015 20:28
Hobbit Game Code Now
has_sword = false
has_ring = false
has_luck = false
puts "You have entered the dragon's lair!!!!"
puts "Do you have a sword? [yes/no]:"
answer = gets.chomp
if answer == "yes"