Skip to content

Instantly share code, notes, and snippets.

View giriannamalai's full-sized avatar
🪲
Catching

Giri Annamalai M giriannamalai

🪲
Catching
View GitHub Profile
@giriannamalai
giriannamalai / all_email_provider_domains.txt
Created July 8, 2022 10:31 — forked from ammarshah/all_email_provider_domains.txt
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
@giriannamalai
giriannamalai / nvmlink
Created July 5, 2022 14:47 — forked from MeLlamoPablo/nvmlink
Creates a symlink to /usr/bin/node after using nvm
@giriannamalai
giriannamalai / fixwrongutf8encoding.php
Created May 20, 2020 07:29 — forked from kasperkamperman/fixwrongutf8encoding.php
Function to fix ut8 special characters displayed as 2 characters (utf-8 interpreted as ISO-8859-1 or Windows-1252)
<?php header('Content-Type: text/html; charset=utf-8'); ?>
<html>
<head>
<title>Fix wrong encoded UTF8 characters</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
</head>
<body>
<pre>
<?php
/* Problem description:
@giriannamalai
giriannamalai / sed 101
Created April 27, 2020 13:01 — forked from worker8/sed 101
Useful sed regex collection
http://sed.sourceforge.net/sed1line.txt
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
@giriannamalai
giriannamalai / forticlientsslvpn-expect.sh
Created April 4, 2020 14:49 — forked from mgeeky/forticlientsslvpn-expect.sh
Simple script intended to automate Fortinet SSL VPN Client connection on Linux using expect scripting.
#!/bin/bash
# Forticlient SSL VPN Client launching script utilizing expect.
# --------------------------------------------
# CONFIGURATION
# If empty - script will take some simple logic to locate appropriate binary.
FORTICLIENT_PATH=""
@giriannamalai
giriannamalai / part.md
Created June 4, 2019 02:44 — forked from oisobstudio/part.md
Django Pagination Server-Side Menggunakan DataTable

myapp/views.py

import json

from django.views.generic import View
from django.http import HttpResponse
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from django.db.models import Q
from django.core.serializers.json import DjangoJSONEncoder
@giriannamalai
giriannamalai / VideoStream.php
Created July 25, 2018 09:51 — forked from ranacseruet/VideoStream.php
PHP VideoStream class for HTML5 video streaming
<?php
/**
* Description of VideoStream
*
* @author Rana
* @link http://codesamplez.com/programming/php-html5-video-streaming-tutorial
*/
class VideoStream
{
private $path = "";
@giriannamalai
giriannamalai / JavaScript.sublime-build
Created February 16, 2018 10:24 — forked from corbanb/JavaScript.sublime-build
Sublime Text - Tools > Build System > New Build System
// Sublime Text - Build System for Javascript
{
"cmd": ["node", "$file"],
"selector": "source.js"
}
@giriannamalai
giriannamalai / fork-example.php
Created December 23, 2017 08:20 — forked from nicksantamaria/fork-example.php
Example: Parallel processing in PHP using pcntl_fork()
<?php
/**
* @file
* Basic demonstration of how to do parallel threads in PHP.
*/
// This array of "tasks" could be anything. For demonstration purposes
// these are just strings, but they could be a callback, class or
// include file (hell, even code-as-a-string to pass to eval()).
@giriannamalai
giriannamalai / eloquent.md
Created November 14, 2017 10:20 — forked from msurguy/eloquent.md
Laravel 4 Eloquent Cheat Sheet.

Conventions:

Defining Eloquent model (will assume that DB table named is set as plural of class name and primary key named "id"):

class Shop extends Eloquent {}

Using custom table name

protected $table = 'my_shops';