Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Bravo! 💯

Nono noncent

💭
Bravo! 💯
View GitHub Profile
View LinkedIn-auto-delete-script.js
Hello folks!,
Long ago I was trying to clean up my LinkedIn mess.
So I've started to delete all the old messages first and then notifications.
Suddenly I realized that I have to click and delete each notification manually each time, surprisingly
there was no bulk select and delete option here.
That's why I made this script to automatically do the same thing for you.It runs in the console panel of the browser.
Script purpose: Delete old notifications, messages & archives
@noncent
noncent / web-auth.php
Last active September 13, 2021 20:48
PHP web auth sample code. Add Web Authentication in PHP. Web Authentication PHP. PHP HTTP Basic Auth. HTTP Basic Auth. Basic Auth
View web-auth.php
<?php
header('Cache-Control: no-cache, must-revalidate, max-age=0');
function html($message)
{
return <<<HTML
<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><title>$message</title><style type="text/css">h1.error{left:0;line-height:200px;margin-top:-100px;position:absolute;text-align:center;top:50%;width:100%;font-size:15em;color:#dadada;-webkit-text-fill-color:#dadada;-webkit-text-stroke-width:1px;-webkit-text-stroke-color:black}</style></head><body><h1 class="error">$message</h1></body></html>
HTML;
}
@noncent
noncent / bootstrap 3 form validation with ajax calls
Last active June 30, 2020 13:26
Below code has a Modal Box and Form inside Modal. Form has validation and ajax submission. On submit modal box will close automatically and will open a new tab with pdf link.
View bootstrap 3 form validation with ajax calls
<?php
// print all POST vars
print_r($_POST);
@noncent
noncent / dummy emails
Created June 29, 2020 06:54
List of valid and invalid emails to check
View dummy emails
!def!xyz%abc@iana.org
"""@iana.org
""@iana.org
"[[&nbsp;test&nbsp;]]"@iana.org
"\"@iana.org
"Abc@def"@iana.org
"Abc\@def"@iana.org
"Austin@Powers"@iana.org
"Doug&nbsp;"Ace"&nbsp;L."@iana.org
"Doug&nbsp;\"Ace\"&nbsp;L."@iana.org
@noncent
noncent / WindowsHostManager.bat
Last active September 9, 2018 11:57
Window Host Manager is windows batch file to add entries in host file
View WindowsHostManager.bat
:: WindowsHostManager.bat
@ECHO OFF
:: BatchGotAdmin
:-------------------------------------
REM --> Check for permissions
>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
REM --> If error flag set, we do not have admin.
if '%errorlevel%' NEQ '0' (
echo Requesting administrative privileges...
View codeigniter_login.md

Here is the very simple demo for getting user's data from database and login system. I hope you will enjoy the code and comments :)

Just get it step by step, Do not hurry

.htaccess code: (Place inside your CodeIgniter project)

<IfModule mod_rewrite.c>

    # Make sure directory listing is disabled

Options +FollowSymLinks -Indexes