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 / 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:
<?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 / 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

@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