Skip to content

Instantly share code, notes, and snippets.

View MdKutubuddinSardar's full-sized avatar

Md Kutubuddin Sardar MdKutubuddinSardar

View GitHub Profile
@MdKutubuddinSardar
MdKutubuddinSardar / html2pdf.html
Created March 5, 2018 13:51
Generate pdf from HTML foem in div using Javascript
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$("#btnPrint").live("click", function () {
var divContents = $("#dvContainer").html();
var printWindow = window.open('', '', 'height=400,width=800');
printWindow.document.write('<html><head><title>DIV Contents</title>');
printWindow.document.write('</head><body >');
@MdKutubuddinSardar
MdKutubuddinSardar / Google Apps Script.gs
Last active March 5, 2018 14:08
Uploading Local Files to Google Drive without Authorization using HTML Form
function doPost(e) {
var data = Utilities.base64Decode(e.parameters.data);
var blob = Utilities.newBlob(data, e.parameters.mimetype, e.parameters.filename);
DriveApp.createFile(blob);
return ContentService.createTextOutput("Done.")
}
@MdKutubuddinSardar
MdKutubuddinSardar / HTML-to-PDF.html
Created March 5, 2018 14:10
HTML-to-PDF with jQuery
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<script src="https://docraptor.com/docraptor-1.0.0.js"></script>
<script>
var downloadPDF = function() {
DocRaptor.createAndDownloadDoc("YOUR_API_KEY_HERE", {
test: true, // test documents are free, but watermarked
type: "pdf",
document_content: document.querySelector('html').innerHTML, // use this page's HTML
// document_content: "<h1>Hello world!</h1>", // or supply HTML directly
<!DOCTYPE html>
<html>
<style>
body {font-family: Arial, Helvetica, sans-serif;}
* {box-sizing: border-box}
/* Full-width input fields */
input[type=text], input[type=password] {
width: 100%;
padding: 15px;
margin: 5px 0 22px 0;
@MdKutubuddinSardar
MdKutubuddinSardar / loginform.html
Created March 6, 2018 04:33
Modal Login Form : How TO - Login HTML Form
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {font-family: Arial, Helvetica, sans-serif;}
/* Full-width input fields */
input[type=text], input[type=password] {
width: 100%;
@MdKutubuddinSardar
MdKutubuddinSardar / forms.html
Created March 6, 2018 12:13
Receive Files in Google Drive
<!DOCTYPE html>
<html>
<head>
<base target="_blank">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Google File Upload by CTRLQ.org</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.5/css/materialize.min.css">
<style>
.disclaimer{width: 480px; color:#646464;margin:20px auto;padding:0 16px;text-align:center;font:400 12px Roboto,Helvetica,Arial,sans-serif}.disclaimer a{color:#009688}#credit{display:none}
@MdKutubuddinSardar
MdKutubuddinSardar / Find and delete the following lines.html
Created March 10, 2018 05:06
How to remove "Read More" and show full post instead in Blogger
<p>
<b:if cond='data:blog.pageType != &quot;static_page&quot;'>
<b:if cond='data:blog.pageType != &quot;item&quot;'>
<div expr:id='&quot;summary&quot; + data:post.id'><data:post.body/
></div>
<script type='text/javascript'>createSummaryAndThumb(&quot;summary<data:post.id/>&quot;);</script>
<div class='readmore-wrap'>
<a class='readmore' expr:href='data:post.url'>Read More</a>
</div>
@MdKutubuddinSardar
MdKutubuddinSardar / html-form-send-email-via-google-script-without-server
Created March 11, 2018 01:57
html-form-send-email-via-google-script-without-server
https://github.com/dwyl/html-form-send-email-via-google-script-without-server
@MdKutubuddinSardar
MdKutubuddinSardar / README.md
Created March 11, 2018 02:23
Send-HTML-form-email-via-google-script-without-server

Send Email from a Static HTML Form using Google Apps Mail!

A Step-by-Step Example of using an HTML Form to send a "Contact Us" Message via Email without a Backend Server using a Google Script - No PHP, Python, Ruby, Java, Node.js etc.

See a working example here: https://dwyl.github.io/html-form-send-email-via-google-script-without-server/

Warning: Google's API has limits on how many emails it can send in a day. This may vary on your Google account, see the limits here. We recommend implementing this tutorial through Part 3, since the data will always be added to the spreadsheet first, then emailed if possible.

@MdKutubuddinSardar
MdKutubuddinSardar / index.html
Created March 11, 2018 09:24
uploading file to Google Drive without authorization
<html>
<head>
<title>Sample script for uploading file to Google Drive without authorization</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.js"></script>
</head>
<body>
<form action="https://script.google.com/macros/s/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/exec" enctype="multipart/form-data" id="form" method="post" onsubmit="return checkSize(2097152)">
Upload a file