Skip to content

Instantly share code, notes, and snippets.

View sidiqahmed's full-sized avatar

sidiqahmed4u sidiqahmed

View GitHub Profile
@sidiqahmed
sidiqahmed / Save-KBFile.ps1
Created June 9, 2020 08:20 — forked from potatoqualitee/Save-KBFile.ps1
Download Windows patch files / KB (patchid like KBxxxxx) and save them to disk using PowerShell
function Save-KBFile {
<#
.SYNOPSIS
Downloads patches from Microsoft
.DESCRIPTION
Downloads patches from Microsoft
.PARAMETER Name
The KB name or number. For example, KB4057119 or 4057119.
@sidiqahmed
sidiqahmed / TSQL-to-POCO
Created November 20, 2019 15:22 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@sidiqahmed
sidiqahmed / TSQL-to-POCO
Created November 20, 2019 15:22 — forked from joey-qc/TSQL-to-POCO
A simple TSQL script to quickly generate c# POCO classes from SQL Server tables and views. You may tweak the output as needed. Not all datatypes are represented but this should save a bunch of boilerplate coding. USAGE: Run this query against the database of your choice. The script will loop through tables, views and their respective columns. Re…
declare @tableName varchar(200)
declare @columnName varchar(200)
declare @nullable varchar(50)
declare @datatype varchar(50)
declare @maxlen int
declare @sType varchar(50)
declare @sProperty varchar(200)
DECLARE table_cursor CURSOR FOR
@sidiqahmed
sidiqahmed / chosen-bootstrap.css
Created January 24, 2019 18:59 — forked from koenpunt/chosen-bootstrap.css
Bootstrap 3.0 theme for Chosen
select.form-control + .chosen-container.chosen-container-single .chosen-single {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.428571429;
color: #555;
vertical-align: middle;
background-color: #fff;
@sidiqahmed
sidiqahmed / Install-ARRFromWeb.ps1
Created January 2, 2018 13:18 — forked from anderssonjohan/Install-ARRFromWeb.ps1
A basic PowerShell script used to push IIS 7 Application Request Routing (tl;dr; reverse proxy features for UrlRewrite) to several servers. Assumptions: - cURL is in the path on the source machine - servers are specified as objects on the pipeline with properties telling the unc path and local path to a writable network share on the server - Win…
param(
[parameter(mandatory=$true, valuefrompipeline=$true)]
$TargetHost,
[switch] $force
)
begin {
$packages = @( `
@{ Name = "rewrite.msi"; Url = "http://download.microsoft.com/download/6/7/D/67D80164-7DD0-48AF-86E3-DE7A182D6815/rewrite_2.0_rtw_x64.msi" }, `
@{ Name = "webpi.msi"; Url = "http://download.microsoft.com/download/B/0/0/B00FEF21-79DE-48B0-8731-F9CFE70CE613/WebPlatformInstaller_3_10_amd64_en-US.msi" }, `
@{ Name = "webfarm.msi"; Url = "http://download.microsoft.com/download/3/4/1/3415F3F9-5698-44FE-A072-D4AF09728390/webfarm_amd64_en-US.msi" }, `
@sidiqahmed
sidiqahmed / countries.md
Created November 17, 2017 12:08 — forked from richjenks/countries.md
ISO 3166 countries by region — AMER, EMEA & APAC
Country ISO 3166 Region
Afghanistan AF EMEA
Åland Islands AX EMEA
Albania AL EMEA
Algeria DZ EMEA
American Samoa AS APAC
Andorra AD EMEA
Angola AO EMEA
Anguilla AI AMER
@sidiqahmed
sidiqahmed / export-html-table-to-excel.md
Created September 11, 2017 15:43 — forked from umidjons/export-html-table-to-excel.md
Export HTML table to Excel in AngularJS

Export HTML table to Excel in AngularJS

myApp.factory('Excel',function($window){
		var uri='data:application/vnd.ms-excel;base64,',
			template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>',
			base64=function(s){return $window.btoa(unescape(encodeURIComponent(s)));},
			format=function(s,c){return s.replace(/{(\w+)}/g,function(m,p){return c[p];})};
		return {
using System;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;
using Windows.Foundation;
using Windows.Phone.Speech.Synthesis;
namespace Utilities
{
public class SpeechUtility : IDisposable
@sidiqahmed
sidiqahmed / css-utilities
Created May 25, 2016 11:45 — forked from simplethemes/css-utilities
Utility Styles
/* ----------------------------------------------------- */
/* Utitlity Styles */
/* ----------------------------------------------------- */
/* Simple Image Thumbnails */
img.imgleft {
float: left;
margin: 0 10px 0 0;
}
@sidiqahmed
sidiqahmed / AccountListController
Created May 25, 2016 11:45 — forked from victorabraham/AccountListController.cls
Controller for the page which has pagination over account records
/*****************************************************************************************************************
* Name : AccountListController
* @author : ####
* @date : 21/04/2016
* @group : Controller
* @description : Controller for page with pagination extending reusable utitlity class
******************************************************************************************************************/
public class AccountListController extends UTIL_ParentSetController {
public AccountListController() {