Skip to content

Instantly share code, notes, and snippets.

View VijayaSankarN's full-sized avatar

Vijaya Sankar N VijayaSankarN

View GitHub Profile
@VijayaSankarN
VijayaSankarN / My Sublime Plugins List.md
Last active August 1, 2017 12:29
My Sublime Plugins List

My Sublime Plugins

  1. DocBlocker : Block comments / Documentation
  2. Emmet : Auto fill HTML Eg: ul>li*5
  3. Gist : Creating new gists from Sublime
  4. Package Control
  5. Select Quoted : Select texts inside quotes
  6. MarkdownEditing : Edit md files
  7. SideBarEnhancements
  8. SublimeCodeIntel : Sublime autocomplete
@VijayaSankarN
VijayaSankarN / AWS Solution Architect Associate.md
Last active April 20, 2017 02:37
AWS Solution Architect Associate - Exam Preparation

My Notes for AWS Solution Architect Associate

@VijayaSankarN
VijayaSankarN / str_replace_n.php
Last active June 18, 2023 14:43
String replace nth occurrence using PHP
<?php
/**
* String replace nth occurrence
*
* @param type $search Search string
* @param type $replace Replace string
* @param type $subject Source string
* @param type $occurrence Nth occurrence
* @return type Replaced string
*/
@VijayaSankarN
VijayaSankarN / str_ireplace_n.php
Last active March 14, 2020 16:08
String replace nth occurrence - case-insensitive using PHP
<?php
/**
* String replace nth occurrence - case-insensitive
*
* @param type $search Search string
* @param type $replace Replace string
* @param type $subject Source string
* @param type $occurrence Nth occurrence
* @return type Replaced string
*/
@VijayaSankarN
VijayaSankarN / Config.php
Created July 11, 2017 13:00
PHP INI parser with environment based reading
<?php
class Config
{
private static $environments = ['dev', 'qa', 'prod'];
private static $filenames = ['assets', 'libraries'];
private static $filepath = "/";
private static $environment = NULL;
private static $file_data = NULL;
@VijayaSankarN
VijayaSankarN / sharepointRESTService.js
Created July 24, 2017 11:40
SharePoint - Angular REST API base class for lists
(function() {
angular.module('myApp').factory('sharepointRESTService', sharepointRESTService)
sharepointRESTService.$inject = ['$q', '$http', '$location'];
function sharepointRESTService($q, $http, $location) {
var factoryUtil = {};
var domain_url = "https://company_name.sharepoint.com/sites/site_name";
// HTTP GET
@VijayaSankarN
VijayaSankarN / BooleanExpression.cls
Created July 5, 2018 06:31
Apex class to evaluate a Boolean expression
/***************************************************************************************************
* Class Name : BooleanExpression
* Created Date : July 4, 2018
* Author : Vijaya Sankar N
* Description : Class to evaluate a boolean expression
* Example : (TRUE AND (FALSE OR TRUE)) is TRUE
****************************************************************************************************/
public class BooleanExpression {
static Map<String, String> logicTypes = new Map<String, String>();
static Map<String, Map<String, String>> expressionLogic = new Map<String, Map<String, String>>();
@VijayaSankarN
VijayaSankarN / FizzBuzz.php
Created January 9, 2019 09:02
Fizz Buzz Test
for($i=1;$i<100;$i++) {
echo ($i%3?'':'Fizz').($i%5?'':'Buzz')?:$i,"<br/>";
}
@VijayaSankarN
VijayaSankarN / ResponsiveLightningDataTable.css
Last active September 17, 2020 12:45
Responsive Table that convers Table Columns to Rows along with Labels
/* RESPONSIVE LIGHTNING DATATABLE - SALESFORCE (With Checkbox)
* https://developer.salesforce.com/docs/component-library/bundle/lightning-datatable/example
*/
@media (max-width: 768px) {
.THIS lightning-datatable.responsive-table thead th:not(:first-child) {
display: none;
}
.THIS lightning-datatable.responsive-table thead th:first-child .slds-checkbox:after {
content: 'Select All';
@VijayaSankarN
VijayaSankarN / Custom Preference Center.html
Last active May 30, 2022 12:09
Marketing Cloud - Custom Preference Center - Profile Center using SSJS and AMPScript. (Cloud Page Solution)
<!DOCTYPE html>
<html>
<head>
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0"
/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>