Skip to content

Instantly share code, notes, and snippets.


BP biapar

Block or report user

Report or block biapar

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
biapar / gist:e36b59eeb1a9c19a470ba4ee9baad280
Last active Jan 26, 2019
Read Email Subject of Office365 Email Box in C#
View gist:e36b59eeb1a9c19a470ba4ee9baad280
using Microsoft.Exchange.WebServices.Data;
using System;
using System.Collections.Generic;
namespace ReadEmail365
class Program
static void Main(string[] args)
biapar / gist:03f3c4b65c823cb47e8877ce9240b66a
Created Nov 23, 2018 — forked from warrenbuckley/gist:5685180
Login ActionResult in AuthSurfaceController
View gist:03f3c4b65c823cb47e8877ce9240b66a
/// <summary>
/// Handles the login form when user posts the form/attempts to login
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public ActionResult HandleLogin(LoginViewModel model)
if (!ModelState.IsValid)
biapar / style.css
Created Sep 6, 2018 — forked from bgardner/style.css
CSS used to customize the Simple Social Icons to match brand color.
View style.css
/* Simple Social Icons
--------------------------------------------- */
.simple-social-icons a {
border: 2px solid #ea4c89 !important;
color: #ea4c89 !important;
.simple-social-icons a:hover {
background-color: #ea4c89 !important;
View gist:3eaa7870b1474f17da0ff27927625de5
using Umbraco.Core;
using Umbraco.Web;
using Umbraco.Web.Trees;
namespace tooorangey.uSpinMeRightRound.App_Start
public class RegisterEvents : ApplicationEventHandler
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
biapar / UmbracoTags.cshtml
Created May 9, 2018 — forked from amogram/UmbracoTags.cshtml
Using Umbraco Tags in a view
View UmbracoTags.cshtml
@if (@Model.Content.GetPropertyValue("tags") != null)
var tags = Model.Content.GetPropertyValue("tags").TryConvertTo<string>();
string[] tagArray = { };
if (tags.Success)
tagArray = tags.Result.Split(',');
if (tagArray.Any())
biapar /
Created Mar 1, 2018 — forked from keeross/
Deleting tons of files in Linux (Argument list too long)

If you’re trying to delete a very large number of files at one time (I deleted a directory with 485,000+ today), you will probably run into this error:

/bin/rm: Argument list too long.

The problem is that when you type something like “rm -rf ”, the “” is replaced with a list of every matching file, like “rm -rf file1 file2 file3 file4” and so on. There is a reletively small buffer of memory allocated to storing this list of arguments and if it is filled up, the shell will not execute the program. To get around this problem, a lot of people will use the find command to find every file and pass them one-by-one to the “rm” command like this:

find . -type f -exec rm -v {} \;

My problem is that I needed to delete 500,000 files and it was taking way too long.

biapar /
Created Dec 18, 2017 — forked from magnetikonline/
Reset Windows 2012R2 local administrator password.

Reset Windows 2012R2 local administrator password

  • Boot from Microsoft Windows Server 2012R2 DVD/ISO.
  • From the Windows Setup menu, click "Next".
  • Select "Repair your computer".
  • Click on "Troubleshoot".
  • Under Advanced options, click "Command Prompt".

At the command prompt, run the following commands:

biapar /
Created Nov 23, 2017 — forked from umidjons/
Export HTML table to Excel in AngularJS

Export HTML table to Excel in AngularJS

		var uri='data:application/;base64,',
			template='<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns=""><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 {
biapar / ImportController.cs
Created Oct 22, 2017 — forked from DavidVeksler/ImportController.cs
How FEE digitized and shared 70 years of archives on the Web: an Umbraco case study
View ImportController.cs
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Archive.FEE.Web.Helper.PDFParser;
using Umbraco.Core;
using Umbraco.Core.Logging;
using Umbraco.Core.Models;
View gist:7bc193df444814bf759d25aa8aee4125
public class DemoPage : ContentPage
public DemoPage ()
var image = new Image () {
Source = "",
VerticalOptions = LayoutOptions.Start,
Scale = 3,
AnchorY = 0
You can’t perform that action at this time.