Skip to content

Instantly share code, notes, and snippets.

@TheCoderRaman
TheCoderRaman / dosu.php
Created August 6, 2019 06:19 — forked from karthikax/dosu.php
PHP Download file to server from URL
<html>
<p style="width: 70%;margin: auto;margin-top: 5%;font-size:larger;text-align:center">
Download a file from any URL</p>
<form method="post" style="width: 70%;margin: auto;margin-top: 10%;">
<input name="url" size="50" placeholder="Source URL" style="width: 100%;height: 10%;font-size: 1.5em;padding:10px" required>
<input name="submit" type="submit" value="Download" style="width: 30%;height: 10%;margin: 5% auto; display: block;">
<p style="width: 70%;margin: auto;margin-top: 10%;font-size:larger;text-align:center">
To <?php echo getcwd(); ?></p>
<p style="width: 70%;margin: auto;font-size: smaller;text-align: center;position: fixed;bottom: 0;background: #fff;">
Powered by: <a href="https://karthikbhat.net/portfolio" target="_blank" style="color:#f60;text-decoration:none;">Karthik</a></p>
#include <cstdio>
typedef signed char s8;
typedef unsigned char u8;
typedef unsigned short u16;
typedef unsigned int u32;
u8 default_rbm[384] = {
0x43, 0x41, 0x46, 0x46, 0x32, 0x38, 0x2E, 0x30, 0x31, 0x2E, 0x30, 0x35, 0x2E, 0x30, 0x30, 0x33,
0x31, 0x00, 0x00, 0x00, 0x50, 0x5D, 0xC9, 0x02, 0x7A, 0x01, 0x00, 0x00, 0xF2, 0x01, 0x00, 0x00,
@TheCoderRaman
TheCoderRaman / calm-breeze-login-screen.markdown
Created February 19, 2020 20:37
Calm breeze login screen
@TheCoderRaman
TheCoderRaman / index.pug
Created February 19, 2020 20:38
Only CSS: Shooting Star
.night
- for (i = 0; i < 20; i++)
.shooting_star
@TheCoderRaman
TheCoderRaman / index.html
Created March 18, 2020 20:08
Simple HTML/CSS Contact Form
<div class="container">
<form id="contact" action="" method="post">
<h3>Colorlib Contact Form</h3>
<h4>Contact us for custom quote</h4>
<fieldset>
<input placeholder="Your name" type="text" tabindex="1" required autofocus>
</fieldset>
<fieldset>
<input placeholder="Your Email Address" type="email" tabindex="2" required>
</fieldset>
@TheCoderRaman
TheCoderRaman / index.html
Created March 26, 2020 12:07
Profile picture
<div class="alert alert-success">
<strong>Hi there!</strong> I've notices this plugin got some attention and I've decided to write this same plugin as a React Component. If you are interested, <a href="https://github.com/dsalvagni/react-profile-picture" target="_parent">you can find it on github</a>. <a href="https://dsalvagni.github.io/react-profile-picture/" target="_parent">You can see it in action also.</a>
</div>
<div class="profile">
<div class="photo">
<input type="file" accept="image/*">
<div class="photo__helper">
<div class="photo__frame photo__frame--circle">
<canvas class="photo__canvas"></canvas>
<div class="message is-empty">
@TheCoderRaman
TheCoderRaman / force-download-remote-file.php
Created March 30, 2020 10:30 — forked from rpowis/force-download-remote-file.php
Check for remote file and force the user to download if it exists.
$file = 'http://www.example.com/path/to/file.ext';
$headers = array_change_key_case(get_headers($file, TRUE));
$filesize = $headers['content-length'][1];
if ( $headers[0] != 'HTTP/1.1 404 Not Found' ) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
@TheCoderRaman
TheCoderRaman / index.html
Created March 31, 2020 05:36
Link Hover Effect: Animate Border Bottom
<ul>
<li><a class="cool-link" href="#">A cool link</a></li>
<li><a class="cool-link" href="#">A cool link</a></li>
<li><a class="cool-link" href="#">A cool link</a></li>
</ul>
<a class="cool-link" href="http://youtu.be/t9nQDdrPgZ0">Check out the associated YouTube Screencast!</a>
@TheCoderRaman
TheCoderRaman / index.html
Created March 31, 2020 05:47
Six Degrees of CodePen
<div class="page-wrap">
<div id="start-screen" class="offscreen-thingo">
<div class="intro pseudo-underline pseudo-underline--huge">
<p class="lead">
Six degrees of separation is the theory that everyone in the world is connected by six or fewer steps.
</p>
<p>As it turns out, it's mostly true for CodePen! Given a "follower" user and a "followee" user, this will attempt to find the shortest link between the two.</p>
</div>
<div class="usercards-wrap"></div>
<button class="start">Calculate</button>