Skip to content

Instantly share code, notes, and snippets.

View yateendra's full-sized avatar
🎯
Focusing

Yateendra Sahu yateendra

🎯
Focusing
View GitHub Profile
@yateendra
yateendra / fb.css
Last active November 26, 2020 09:42
make m.facebook.com fit for desktop browser (using Stylus Extension)
body.touch {
max-width: 600px;
margin: 0 auto;
}
._129- {
border-top: none !important;
}
@jasny
jasny / linkify.php
Last active October 21, 2023 16:28
PHP function to turn all URLs in clickable links
<?php
/**
* Turn all URLs in clickable links.
*
* @param string $value
* @param array $protocols http/https, ftp, mail, twitter
* @param array $attributes
* @return string
*/
public function linkify($value, $protocols = array('http', 'mail'), array $attributes = array())
<?php
// Define your username and password
$username = "USERNAME HERE";
$password = "PASSWORD HERE";
if ($_POST['txtUsername'] != $username || $_POST['txtPassword'] != $password) {
?>
<h1>Login</h1>
You must login to see this private content.<br>
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
<p><label for="txtUsername">Username:</label>