Skip to content

Instantly share code, notes, and snippets.

View prabhakar711's full-sized avatar
☯️
Searching for peace.

Prabhakaran prabhakar711

☯️
Searching for peace.
View GitHub Profile
@prabhakar711
prabhakar711 / Project_Euler.txt
Last active October 21, 2015 10:42
Project Euler Problem 1
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.4
Creation-Date: 2015-10-14T22:07:03+05:30
====== Project Euler ======
Created Wednesday 14 October 2015
Problem 1:
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5
@prabhakar711
prabhakar711 / ubuntu_agnoster_install.md
Created September 1, 2017 05:23 — forked from renshuki/ubuntu_agnoster_install.md
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
use PHPMailer\PHPMailer\Exception;
require("assets/PHPMailer/src/PHPMailer.php");
require("assets/PHPMailer/src/SMTP.php");
require("assets/PHPMailer/src/Exception.php");
$name = trim($_POST['name']);
@prabhakar711
prabhakar711 / highlight.pipe.ts
Created July 22, 2019 05:18 — forked from adamrecsko/highlight.pipe.ts
Angular2 text highlight pipe
import {PipeTransform, Pipe} from 'angular2/core';
@Pipe({ name: 'highlight' })
export class HighLightPipe implements PipeTransform {
transform(text: string, [search]): string {
return search ? text.replace(new RegExp(search, 'i'), `<span class="highlight">${search}</span>`) : text;
}
}
/** Usage:
import {NgModule} from '@angular/core';
import {ScrollingModule} from '@angular/cdk/scrolling';
import {A11yModule} from '@angular/cdk/a11y';
import {CdkTableModule} from '@angular/cdk/table';
import {CdkTreeModule} from '@angular/cdk/tree';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {CdkStepperModule} from '@angular/cdk/stepper';
import {PortalModule} from '@angular/cdk/portal';
import {
MatAutocompleteModule,
Xceed Xcellence Pvt Ltd.
Privacy Policy of xceedxcellence.com
Privacy Policy
Last updated: January 04, 2020
This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You.
We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy is maintained by the Free Privacy Policy Generator.

Reset mysql root password in Mac OS:

First Stop MySQL:

  1. Go to: 'System Preferences' >> 'MySQL' and stop MySQL

OR,

  1. sudo /usr/local/mysql/support-files/mysql.server start
  2. sudo /usr/local/mysql/support-files/mysql.server stop
@prabhakar711
prabhakar711 / mapOrder.js
Created March 18, 2020 14:32 — forked from ecarter/mapOrder.js
Order an array of objects based on another array order
/**
* Sort array of objects based on another array
*/
function mapOrder (array, order, key) {
array.sort( function (a, b) {
var A = a[key], B = b[key];
@prabhakar711
prabhakar711 / helm-cheatsheet.md
Created May 25, 2020 09:11 — forked from tuannvm/cka.md
#Helm #Kubernetes #cheatsheet, happy helming!
@prabhakar711
prabhakar711 / CHANGELOG.md
Created October 15, 2020 05:26 — forked from juampynr/CHANGELOG.md
Sample CHANGELOG

Change Log

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as