Skip to content

Instantly share code, notes, and snippets.

View pielegacy's full-sized avatar

Alex Billson pielegacy

  • Mecca Brands
  • Melbourne, Australia
  • 23:28 (UTC -12:00)
View GitHub Profile
@pielegacy
pielegacy / Create Term
Created April 6, 2015 21:46
IT Sharing
#New Element
@route('/create')
def create():
return template("create")
@route('/create', method="POST")
def success():
term = request.forms.get('term')
define = request.forms.get('define')
cat = request.forms.get('category')
@pielegacy
pielegacy / Paginator First Attemp
Last active August 29, 2015 14:21
For Talfies <3
<div class="quotes-container">
@{
var items = Model.ToList(); //Getting Database Model and converting it to a list for easy operations
int maxpage = items.Count / 26; //Finding the max page (int floors the decimal place which helps)
int startpoint = items.Count() - 1;
if (page > 1)
{
startpoint -= 26 * (page - 1);
}
for (var i = startpoint; i >= items.Count() - 26 * page && i > 0; i--) //Basic For Loop printing the quotes to screen
using SwinGameSDK;
namespace MyGame
{
// Just a few functions to help work with Swingame easily
// Created by Alex Billson
class SwinGameHelpers
{
public Vector newVect(float x, float y)
{
@pielegacy
pielegacy / buildswin.bat
Last active August 2, 2016 00:44
Build SwinGame on Windows without an IDE
set PATH=%PATH%;C:\Windows\Microsoft.NET\Framework\v4.0.30319.
msbuild MyGameWin.csproj
bin\Debug\MyGame.exe
@pielegacy
pielegacy / tasks.json
Created December 30, 2016 04:44
Python single file task runner
{
// Python Single File Task Runner for VS Code
// Written by Alex Billson (pielegacy)
"version": "0.1.0",
"command": "python",
"isShellCommand": true,
"args": [
"${file}"
],
"showOutput": "always"
@pielegacy
pielegacy / Sandler Clan Ranking.md
Last active May 16, 2017 05:00
A ranking of the Sandler Clan members

Best Member

  1. Adam Sandler
  • The King
  • The OG
  • Billy Madison was good
  • Happy Gilmore was pretty good
  1. Chris Rock
  • Everybody Hates Chris > The Rest of the Material on this List
  1. Kevin James
  • Stellar filmography
@pielegacy
pielegacy / Rogen Clan Ranking.md
Created January 2, 2017 10:25
Ranking of the Rogen Clan from This Is The End

Members

  1. Jonah Hill
  2. James Franco
  3. Danny McBride
  • He's like kinda better than Craig Robinson
  1. Craig Robinson
  • The Office
  • Wasn't in any shit Seth Rogen films? But he was
  1. Seth Rogen
  • The worst
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
namespace TomatoAPI.Controllers
{
[Route("api/[controller]")]
public class ValuesController : Controller
@pielegacy
pielegacy / project.json
Last active January 16, 2017 07:42
My project.json file from that Medium article I dun did
{
"dependencies": {
"Microsoft.NETCore.App": {
"version": "1.1.0",
"type": "platform"
},
"Microsoft.AspNetCore.Mvc": "1.1.0",
"Microsoft.AspNetCore.Routing": "1.1.0",
"Microsoft.AspNetCore.Server.IISIntegration": "1.1.0",
"Microsoft.AspNetCore.Server.Kestrel": "1.1.0",
@pielegacy
pielegacy / Tomato.cs
Created January 16, 2017 06:53
That stupid tomato class from that article
using System;
using System.ComponentModel.DataAnnotations;
namespace TomatoAPI
{
public class Tomato
{
[Key]
public int Id { get; set; }
[Required]