Skip to content

Instantly share code, notes, and snippets.

View beyond-code-github's full-sized avatar

Pete Smith beyond-code-github

View GitHub Profile
@beyond-code-github
beyond-code-github / TeacherList.html
Last active August 29, 2015 14:27
Teachers list markup
<h1>List of teachers</h1>
<form action="api/teachers">
<input type="text" id="name" />
<input type="text" id="notes" />
<input type="submit" id="addNewButton" />
</form>
<table id="dataTableTarget">
</table>
@beyond-code-github
beyond-code-github / StudentList.html
Last active August 29, 2015 14:27
Students list markup
<h1>List of students</h1>
<form action="api/students">
<input type="text" id="name" />
<input type="text" id="notes" />
<input type="submit" id="addNewButton" />
</form>
<table id="dataTableTarget">
</table>
@beyond-code-github
beyond-code-github / list.html
Created August 12, 2015 06:59
Generic list markup
<h1>@Model.ListTitle</h1>
<form action="@Model.PostUrl">
<input type="text" id="name" />
<input type="text" id="notes" />
<input type="submit" id="addNewButton" value="Add" />
</form>
<table id="dataTableTarget">
</table>
@beyond-code-github
beyond-code-github / list-2.html
Created August 19, 2015 06:29
Generic list markup including added feature with toggle logic
<h1>@Model.ListTitle</h1>
<form action="@Model.PostUrl">
<input type="text" id="name" />
<input type="text" id="notes" />
<input type="submit" id="addButton" value="Add" />
</form>
@if (Model.RequiresBulkUpload) {
<form id="bulkUpload">
@beyond-code-github
beyond-code-github / teacherconfig.cs
Last active August 29, 2015 14:27
Example of teaher list config run amok
var teacherListConfig = new ListConfig()
{
ListTitle = "List of Teachers",
PostUrl = "api/teachers",
GetUrl = "api/teachers",
RequiresBulkUpload = true,
AllowSave = true,
ReadOnlyUnlessAdmin = false,
PageSize = 50,
ValidateNames = true,
@beyond-code-github
beyond-code-github / teacherscontroller.cs
Last active August 29, 2015 14:27
After refactoring, intent has simply been moved into the controller/model
public class TeachersController : ListController
{
protected override ListConfig Configuration
{
get
{
return new ListConfig()
{
ListTitle = "List of Teachers",
PostUrl = "api/teachers",

So you've learned to code... now what? Beyond code provides blog posts, podcasts, videos and training material to help you on your journey from entry level programmer to productive software development team member

Beyond Code is important because ultimately, making software is a 'people' business, and the social/personal aspects of a team are just as important as the tech.

@beyond-code-github
beyond-code-github / teacherlist.html
Last active November 22, 2015 12:35
Teacher list after componentisation
<h1>List of teachers</h1>
<tablelist href="http://example.com/teachers">
<column id="notes"></column>
<column id="text"></columns>
</tablelist>
<bulkupload id="teacherUpload">
</bulkupload>
using System;
using System.Collections.Generic;
namespace OnlineShop
{
delegate decimal Discount(decimal amount, int yearsAccountHeld);
public static class Discounts
{
public static decimal NotRegistered(decimal amount, int yearsAccountHeld) => amount;
@beyond-code-github
beyond-code-github / Examples.txt
Last active February 5, 2018 09:14
Pub name generator, simply wire in a function r that provides a random number (min, max) =>
"The King's Arms"
"The Three Dragons"
"The Wise Old Star"
"The George's Retreat"
"The Rising George"
"The Trout's Tavern"
"The Four Moons"
"The Bird's Arms"
"The Great Cross"
"The Angry Lion"