Skip to content

Instantly share code, notes, and snippets.

View mayank's full-sized avatar
🎹
Playing Code!

Mayank mayank

🎹
Playing Code!
View GitHub Profile
const options = {
ignorePDF: <boolean>,
generateJPG: <boolean>,
jpgQuality: <numeric>,
chrome: <puppeteer-chrome-opts>,
};
// returns a buffer consists of pdf, html and jpeg as requested
const pdfBuffer = await mould.pdf('via', {
company_report_details: {
name: "Roadzen",
.bottom
.container-fluid
.row
.col-sm-6
.props.text-center
span.title Address:
span.desc #{company_report_details.address}
.col-sm-3
.props.text-center
span.title Phone No:
include butterfly
doctype html
html
head
meta(name="viewport" content="width=device-width, initial-scale=1.0")
style
include:scss template.scss
body
.page
include heading
var rustyMould = require('rusty-mould');
const options = {
folder: "templates/"
};
// loading the templates at start of application
await rustyMould('my-app-name', options);
@mayank
mayank / 1.mongodb-aws-setup-guide.md
Created June 25, 2019 09:21 — forked from calvinh8/1.mongodb-aws-setup-guide.md
MongoDB Setup Guide for AWS EC2 Instances with Auth Enabled
@mayank
mayank / docker.service
Created January 19, 2017 12:09
A good docker service file for systemctl config
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network.target docker.socket firewalld.service
Requires=docker.socket
[Service]
Type=notify
# the default is not to use systemd for cgroups because the delegate issues still
# exists and systemd currently does not support the cgroup feature set required
ssh-dss AAAAB3NzaC1kc3MAAACBANXO0K+zWJu59J4ZnqOamgUdkHbDUb38mGbotdw9SkAOD4pBQpM3+MI6kWaCMNCvfhwLdk9eWT0RuAAGQ/Y9Nx18y0JrADDeVZmQJpc4ujYUhzLh50QLyucBRpDHLNvBo3nRDEtB6ebSpyjTh4iKlQNHD6mH/+2ERBX1VCWm0PLlAAAAFQCK1UQpjzErTefBHy+M4dVCW9fDTwAAAH9b8N56i2vzMMeaU+HqfBfHRJW/1WrEtjv09iHvdOe7TbQlUPTVPcUafhMNM+W06azJdJf2htkom4Uni4lM5lnCz4GQg7Y7AgjmU8B4ZdXqNwMMxhsUn6WSjdCe/Y6YixTnz5nEZAXbVNAl16/NRy8GiE0IruuSsAsxEJ8rGPLbAAAAgBZc/R+ysNdZBCaLVp7+bGF6gx8oD0n9LNKjBG+PGzIgRz95tVUFYRnmil8dtZg6lKkwlGvNxNVP3mE2eDKY9SDaPnJTRWWBb7iIm95sKx8JEPDixBjxZsLbu4hjg7sTPxS6vYYW5VmHQu6H7hSihdkJkYpQM4MkClTx4ZMtvY5R mk@mk3
@mayank
mayank / CHANGELOG.md
Created August 26, 2016 11:34
A sample Change Log File

New in 0.3.6 (since 0.3.5-rc3)

* initialize() on Namespace objects, as well as Mixins (and all
  descendants) is now called by the framework, with ``self`` as a
  parameter.
* xhr-longpoll fixed for compat with gevent 1.0bX
* gevent 1.0 bugfixes
* added a paster server integration , use with: egg:gevent-socketio#paster
  • Fixed memory leak
@mayank
mayank / manifest.json
Created July 29, 2016 19:53
Air Horner Progressive Web App - sample manifest file
{
"name": "The Air Horner",
"short_name": "Air Horner",
"icons": [
{
"src": "images/touch/Airhorner_512.png",
"type": "image/png",
"sizes": "512x512"
}],
"start_url": "/?homescreen=1",
@mayank
mayank / form.js
Last active September 8, 2015 07:56 — forked from mazjs/form.js
//the whole thing is wrapped in an anonymous function
$(document).on('change', '#id_tel_no', function() {
var tel_no = $('#id_tel_no').val();
var state_code = $('select[name=state_code]').val();
var customer_id = '<?php echo $customer->id;?>';
if (state_code != '' && tel_no != '') {