Skip to content

Instantly share code, notes, and snippets.

Light a candle than to curse the darkness.

Madhav Paudel poudelmadhav

Light a candle than to curse the darkness.
Block or report user

Report or block poudelmadhav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
poudelmadhav / index.html
Last active Nov 29, 2016
Personal Resume Page
View index.html
<title>Madhav Paudel</title>
<link rel="stylesheet" type="text/css" href="css/master.css">
<link href="" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<div class="prof-box">
poudelmadhav / cplus_program_to_transfer_balance.cpp
Last active Jan 12, 2019
C++ program to transfer money from one account to another
View cplus_program_to_transfer_balance.cpp
Balance Transfer
//Author Madhav Paudel
#include <iostream>
using namespace std;
View javaScript.html
<!DOCTYPE html>
let d = document;
// d.querySelector("body").style.backgroundColor = "#f7f7f7";
// d.querySelector("body").style.backgroundImage = "url('images/background.jpg')";
poudelmadhav / calculator.html
Created Sep 13, 2018
A simple calculator using javascript
View calculator.html
<!DOCTYPE html>
<title>JS Calculator</title>
<div id="calc-box">
<h3 align="center">Calculator</h3>
<table border="0" width="400">
poudelmadhav / nav-color-change.html
Created Sep 22, 2018
Background color of navbar change on scroll
View nav-color-change.html
<div class="nav"></div>
window.onscroll = () => {
const nav = document.querySelector('.nav');
if(this.scrollY <= 500) = 'rgba(0,0,0,0)';
else = 'rgba(0,0,0,0.9)';
View add-or-remove-table-row-based-focus.html
<input type="number" id="days"> <!-- the td and tr are added equal to this value -->
<input type="text" onfocus="addItineraryDays()"> <!-- function calling onfocus this input -->
<table class="table table-striped table-bordered">
<tbody id="myTable">
poudelmadhav / slacknotify.html
Last active Feb 21, 2019
An example in jquery to notify slack filled data in the contact form
View slacknotify.html
<!-- Dont forget to keep your webhook url in ENV["webhook_url"] -->
<!DOCTYPE html>
<script src="" integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
input[type=text], select {
width: 100%;
padding: 12px 20px;
View lambda function to redirect based of browser's language.js
exports.handler = (event, context, callback) => {
const request = event.Records[0].cf.request;
const headers = request.headers;
if(request.uri == '/') {
if (typeof headers['accept-language'] !== 'undefined') {
const supportedLanguages = headers['accept-language'][0].value;
console.log('Supported languages:', supportedLanguages);
callback(null, redirect('/en/index.html'));
} else if(supportedLanguages.startsWith('ja')){
View serverless authentication using cloudfront.js
'use strict';
exports.handler = (event, context, callback) => {
// Get request and request headers
const request = event.Records[0].cf.request;
const headers = request.headers;
// Configure authentication
const authUser = 'user';
const authPass = 'pass';
View get language redirect url in language switch button.js
<div id="myDropdown" class="dropdown-content">
<a href="/ja/index.html" id="JapaneseLanguage">JAPANESE</a>
<a href="/en/index.html" id="EnglishLanguage">ENGLISH</a>
$( document ).ready(function() {
var ja = document.getElementById("JapaneseLanguage");
var en = document.getElementById("EnglishLanguage");
You can’t perform that action at this time.