Skip to content

Instantly share code, notes, and snippets.

View saad749's full-sized avatar

Saad Farooq saad749

View GitHub Profile
@saad749
saad749 / AOE II Quitters.md
Last active May 14, 2017 19:33
AOE II Quitters

Hosts (Sore loosers, Boot players when losing)

  • LEONAX
  • CAMPER
  • It's a SONY

Players (Who quit before one of their castles have been razed, and the first one to quit in team)

  • The Silver Elite
@saad749
saad749 / append.js
Created February 2, 2017 05:56
Using @: to append options with list from Server Side (Razor Syntax)
.append($("<option>", { "text": "-Please Select-" }))
@foreach (var item in Model.XXX)
{
@: .append($("<option>", { "text": "@item.Title", "value": @item.Id }))
}
@saad749
saad749 / sql_to_poco.sql
Last active December 18, 2016 17:14
Generate POCO from SQL Table. Just replace the table name, and you will get a C# Class. Copied from: http://stackoverflow.com/a/19123064/1545156
Declare @TableName sysname = 'REPLACE_WITH_YOUR_TABLE_NAME'
declare @result varchar(max) = 'public class ' + @TableName + '
{'
select @result = @result + '
public ' + ColumnType + ' ' + ColumnName + ' { get; set; }
'
from
(
select
@saad749
saad749 / AlertViewModel.cs
Created August 22, 2016 12:43
Easy Generic way to Display Alerts in ASP.Net Core
public class AlertViewModel
{
public string AlertType { get; set; }
public string AlertTitle { get; set; }
public string AlertMessage { get; set; }
public AlertViewModel(string type, string title, string message)
{
AlertType = type;
AlertTitle = title;
@saad749
saad749 / index.html
Created August 16, 2016 10:06
2 Column Row Placeholder
<div class="row">
<div class="col-sm-6">
</div>
<div class="col-sm-6">
</div>
</div>
#include "Includes.h"
using namespace std;
void display(void);
void myTimer(int id);
void registerCallbacks();
/* Setup Data */
// initialize a setup object
#include <Windows.h> //Not Including results in error C3861: 'exit': identifier not found
#include <glut.h> //OpenGL Library
#include <iostream> //Not Including Results in error C2039: 'cout' : is not a member of 'std'
#include "RGBA.h" //Picture Loading Library --- Requires Windows.h && iostream to work. Better than pixMap.h
#define PI 3.1415926535898
//Function Headers
void myInit(void);
void myDisplay(void);