Skip to content

Instantly share code, notes, and snippets.

Pete Smith beyond-code-github

Block or report user

Report or block beyond-code-github

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@beyond-code-github
beyond-code-github / Examples.txt
Last active Feb 5, 2018
Pub name generator, simply wire in a function r that provides a random number (min, max) =>
View Examples.txt
"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"
View DiscountCalculator.cs
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 / teacherlist.html
Last active Nov 22, 2015
Teacher list after componentisation
View teacherlist.html
<h1>List of teachers</h1>
<tablelist href="http://example.com/teachers">
<column id="notes"></column>
<column id="text"></columns>
</tablelist>
<bulkupload id="teacherUpload">
</bulkupload>
View context.md

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 / teacherscontroller.cs
Last active Aug 29, 2015
After refactoring, intent has simply been moved into the controller/model
View teacherscontroller.cs
public class TeachersController : ListController
{
protected override ListConfig Configuration
{
get
{
return new ListConfig()
{
ListTitle = "List of Teachers",
PostUrl = "api/teachers",
@beyond-code-github
beyond-code-github / teacherconfig.cs
Last active Aug 29, 2015
Example of teaher list config run amok
View teacherconfig.cs
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 / list-2.html
Created Aug 19, 2015
Generic list markup including added feature with toggle logic
View list-2.html
<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">
View list.html
<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>
View StudentList.html
<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>
View TeacherList.html
<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>
You can’t perform that action at this time.