Skip to content

Instantly share code, notes, and snippets.

Ramasamy Solaiappan aaryan79831014

Block or report user

Report or block aaryan79831014

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
@aaryan79831014
aaryan79831014 / IIS Redirect
Created Jul 3, 2019
Scott Gu's tutorial IIS Redirect
View IIS Redirect
Scott Gu
https://weblogs.asp.net/scottgu/tip-trick-fix-common-seo-problems-using-the-url-rewrite-extension
@aaryan79831014
aaryan79831014 / media.css
Created Apr 30, 2019
Media CSS Query for Devices
View media.css
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
}
/*
##Device = Laptops, Desktops
##Screen = B/w 1025px to 1280px
View Good_Reads.txt
CSS - Hand Book
-----------------
https://medium.freecodecamp.org/the-css-handbook-a-handy-guide-to-css-for-developers-b56695917d11
PDF -
https://flaviocopes.com/page/ebooks-links/
@aaryan79831014
aaryan79831014 / addjquerytoConsole.js
Last active Mar 20, 2019
Inject jquery support to the chrome browser console
View addjquerytoConsole.js
//Run the following in console, this should add jquery support to the head of the document, then jquery can be used in console
var script = document.createElement('script');script.src = "https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);
@aaryan79831014
aaryan79831014 / GenerateOrder.cs
Created Jan 19, 2019
Manually generating an order in Merchello
View GenerateOrder.cs
//ORGINALLY TAKEN FROM https://gist.github.com/rustyswayne/598049064a02fce1597c
//------------------------------------------------------------------------------
// Adding the shipmethod is typically done in the back office through the UI.
// Interested in the use case to dynamically add theses?
var key = Constants.ProviderKeys.Shipping.FixedRateShippingProviderKey;
var defaultCatalogKey = Constants.DefaultKeys.Warehouse.DefaultWarehouseCatalogKey;
// this would have to be done through the back office as it uses an internal service
var us = MerchelloContext.Current.Services.StoreSettingService.GetCountryByCode("US");
View Responsive Youtube.txt
First method is try http://embedresponsively.com/
--------------
Second Method
---------------
CSS
.video-container {
position: relative;
padding-bottom: 56.25%; /*16:9*/
@aaryan79831014
aaryan79831014 / Web.Config.txt
Last active Jan 9, 2019
Web.config SecurityConfig
View Web.Config.txt
Refer https://github.com/east-sussex-county-council/Escc.Web.SecurityConfig
**Content Security Policy is quite a bit of restricting the contents that the client can have, so had to be thought out before implementing**
Content-Security-Policy - This is pretty hard to implement as this http-header is to whitelist what contents are allowed in the web site.
Refer : https://rehansaeed.com/content-security-policy-for-asp-net-mvc/ & https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP
<system.webServer>
<httpProtocol>
<customHeaders>
<remove name="X-Powered-By" />
<add name="X-Frame-Options" value="SAMEORIGIN" />
<add name="X-Content-Type-Options" value="nosniff" />
@aaryan79831014
aaryan79831014 / HomeController.cs
Last active Dec 21, 2018
iTextSharp to print pdf
View HomeController.cs
using iTextSharp.text;
using iTextSharp.text.html.simpleparser;
using iTextSharp.text.pdf;
using iTextSharp_PDF.Services;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.Hosting;
@aaryan79831014
aaryan79831014 / episerver.txt
Created Nov 29, 2018
Useful links for Episerver
View episerver.txt
https://world.episerver.com/blogs/Alexander-Haneng/Dates/2012/7/How-to-define-properties-in-EPiServer-7---A-quick-reference/
@aaryan79831014
aaryan79831014 / web.config.txt
Created Nov 4, 2018
Log4net debugging changes on web.config
View web.config.txt
<!--Following are the changes that has to be done in web.config for Log4net debugging (if you think the problem with Log4Net logging module itself)-->
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="log4net.Internal.Debug" value="true"/>
</appSettings>
</configuration>
And the following has to be added as well
You can’t perform that action at this time.