Skip to content

Instantly share code, notes, and snippets.

View saad749's full-sized avatar

Saad Farooq saad749

View GitHub Profile
#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);
#include "Includes.h"
using namespace std;
void display(void);
void myTimer(int id);
void registerCallbacks();
/* Setup Data */
// initialize a setup object
@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>
@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 / 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 / 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 / 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 / kubectl describe nodes results.txt
Created March 2, 2018 16:59
kubectl describe nodes results
kube-master@ubuntu:~$ kubectl describe nodes
Name: ubuntu
Roles: master
Labels: beta.kubernetes.io/arch=amd64
beta.kubernetes.io/os=linux
kubernetes.io/hostname=ubuntu
node-role.kubernetes.io/master=
Annotations: node.alpha.kubernetes.io/ttl=0
volumes.kubernetes.io/controller-managed-attach-detach=true
Taints: node-role.kubernetes.io/master:NoSchedule
@saad749
saad749 / 10-kubeadm.conf
Created March 2, 2018 17:02
Added KUBELET_EXTRA_ARGS
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=10.96.0.10 --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki"
Environment="KUBELET_EXTRA_ARGS=--node-ip=192.168.100.17"
ExecStart=
@saad749
saad749 / 10-kubeadm.conf
Created March 2, 2018 17:03
Changed --cluster-dns
[Service]
Environment="KUBELET_KUBECONFIG_ARGS=--bootstrap-kubeconfig=/etc/kubernetes/bootstrap-kubelet.conf --kubeconfig=/etc/kubernetes/kubelet.conf"
Environment="KUBELET_SYSTEM_PODS_ARGS=--pod-manifest-path=/etc/kubernetes/manifests --allow-privileged=true"
Environment="KUBELET_NETWORK_ARGS=--network-plugin=cni --cni-conf-dir=/etc/cni/net.d --cni-bin-dir=/opt/cni/bin"
Environment="KUBELET_DNS_ARGS=--cluster-dns=192.168.100.17 --cluster-domain=cluster.local"
Environment="KUBELET_AUTHZ_ARGS=--authorization-mode=Webhook --client-ca-file=/etc/kubernetes/pki/ca.crt"
Environment="KUBELET_CADVISOR_ARGS=--cadvisor-port=0"
Environment="KUBELET_CERTIFICATE_ARGS=--rotate-certificates=true --cert-dir=/var/lib/kubelet/pki"
Environment="KUBELET_EXTRA_ARGS=--node-ip=192.168.100.17"
ExecStart=