Compare commits

...

2 Commits

Author SHA1 Message Date
90f6c3ee37
php: import from mikaela.github.io 2023-01-23 09:26:05 +02:00
9e611e8c8f
rm WeeChat
Contents was a boilerplate that was never finished and no IRC server supports REMOVE nowadays.
2023-01-23 09:22:02 +02:00
7 changed files with 138 additions and 21 deletions

0
WeeChat/.gitignore vendored
View File

View File

@ -1,21 +0,0 @@
// kickremove - WeeChat script to convert KICK to REMOVE on supported
// networks.
/*
Copyright (c) 2015, Mikaela Suomalainen
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
weechat.register("kicmremove", "Mikaela", "1.0", "ISC", "Script to replace KICK with REMOVE on supported networks.", "", "");
weechat.print("", "Hello, this script has loaded!");

9
php/IP.php Executable file
View File

@ -0,0 +1,9 @@
<?php
header("Content-Type: text/plain; charset=utf-8");
$IP = $_SERVER['REMOTE_ADDR'];
echo "$IP";
?>

13
php/IPTITLE.php Executable file
View File

@ -0,0 +1,13 @@
<?php
header("Content-Type: text/html; charset=utf-8");
$IP = $_SERVER['REMOTE_ADDR'];
echo '<!DOCTYPE html>';
echo '<head>';
echo '<meta charset="UTF-8" />';
echo "<title>$IP</title>";
echo '</head>';
echo '</html>';
?>

3
php/README.md Normal file
View File

@ -0,0 +1,3 @@
Arcived from https://github.com/Mikaela/mikaela.github.io/commits/master/php
Not touched in ages.

57
php/gravatar.php Executable file
View File

@ -0,0 +1,57 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- <meta http-equiv="refresh" content="60" /> -->
<meta name="description" content="This is simple PHP script to convert email address into Gravatar link and show the result. This is inspired by asaph/gravatar/ and the documentation it linked to and I wanted to see could I do this by myself too." />
<title>Email --> Gravatar</title>
</head>
<body>
<p>
<form action="gravatar.php" method="post">
*Email address: <input type="text" name="email"><br>
Size: <input type="text" name="size">
<input type="submit">
</form>
</p>
<p>* marks required field. Only email address is required.</p>
<p>Size can be anything from 1 to 2048. If it's empty, size is
80.</p>
<p>For Steam profile pictures, set size as 184.</p>
</body>
</html>
<?php
$email = trim( $_REQUEST["email"] );
$size = $_REQUEST["size"];
echo "<p>Email<br> $email<br></p>";
$email = strtolower( $email );
$md5email = md5( $email );
// Do nothing if our md5 is an empty string!
if($md5email != "d41d8cd98f00b204e9800998ecf8427e") {
echo "<p>md5<br> $md5email</p>";
echo "<p>Link<br>";
$gravatar = "https://gravatar.com/avatar/$md5email?s=$size";
echo "$gravatar</p>";
echo "<p>";
echo "<img src=$gravatar>";
echo "</p>";
}
echo '<hr/>
<p><a href="https://github.com/Mkaysi/mkaysi.github.io/blob/master/php/gravatar.php">Source: https://github.com/Mkaysi/mkaysi.github.io/blob/master/php/gravatar.php</a></p>
<hr/>';
?>

56
php/libravatar.php Executable file
View File

@ -0,0 +1,56 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<!-- <meta http-equiv="refresh" content="60" /> -->
<meta name="description" content="This is simple PHP script to convert email address into Libravatar link and show the result. This is inspired by those which inspired gravatar.php and gravatar.php itself." />
<title>Email --> Libravatar</title>
</head>
<body>
<p>
<form action="libravatar.php" method="post">
*Email address: <input type="text" name="email"><br>
Size: <input type="text" name="size">
<input type="submit">
</form>
</p>
<p>* marks required field. Only email address is required.</p>
<p>Size can be anything from 1 to 2048. If it's empty, size is 80.</p>
<p>For Steam profile pictures, set size as 184.</p>
</body>
</html>
<?php
$email = trim( $_REQUEST["email"] );
$size = $_REQUEST["size"];
echo "<p>Email<br> $email<br></p>";
$email = strtolower( $email );
$md5email = md5( $email );
// Do nothing if our md5 is an empty string!
if($md5email != "d41d8cd98f00b204e9800998ecf8427e") {
echo "<p>md5<br> $md5email</p>";
echo "<p>Link<br>";
$libravatar = "https://seccdn.libravatar.org/avatar/$md5email?s=$size.jpeg";
echo "$libravatar</p>";
echo "<p>";
echo "<img src=$libravatar>";
echo "</p>";
}
echo '<hr/>
<p><a href="https://github.com/Mkaysi/mkaysi.github.io/blob/master/php/libravatar.php">Source: https://github.com/Mkaysi/mkaysi.github.io/blob/master/php/libravatar.php</a></p>
<hr/>'
?>