Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kesarawimal's full-sized avatar

Kesara Wimal kesarawimal

View GitHub Profile
User.findOne({
name: req.body.name
}, function(err, user) {
if (err) throw err;
if (!user) {
res.json({ success: false, message: 'Authentication failed. User not found.' });
} else if (user) {
@kesarawimal
kesarawimal / axios.js
Last active February 15, 2021 15:42
FormSubmit AJAX Documentation: Axios
// https://github.com/axios/axios
axios.defaults.headers.post['Content-Type'] = 'application/json';
axios.post('https://formsubmit.co/ajax/your@email.com', {
name: "FormSubmit",
message: "I'm from Devro LABS"
})
.then(response => console.log(response))
.catch(error => console.log(error));
@kesarawimal
kesarawimal / dabblet.css
Last active August 27, 2021 16:47
Untitled
@import url("https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css");
h1 {
text-align: center;
margin: 35px 0 20px 0 !important;
}
@kesarawimal
kesarawimal / dabblet.css
Created September 5, 2021 17:34
Untitled
@import url("https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css");
h1 {
text-align: center;
margin: 35px 0 20px 0 !important;
}
@kesarawimal
kesarawimal / dabblet.css
Created September 5, 2021 17:35
Untitled
@import url("https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css");
h1 {
text-align: center;
margin: 35px 0 20px 0 !important;
}
Date Open High Low Close Adj Close Volume
2012-12-31 72.932854 76.485718 72.714287 76.024284 66.736229 164873100
2013-01-02 79.117142 79.285713 77.375717 78.432854 68.850548 140129500
2013-01-03 78.268570 78.524284 77.285713 77.442856 67.981491 88241300
2013-01-04 76.709999 76.947144 75.118568 75.285713 66.087891 148583400
2013-01-07 74.571426 75.614288 73.599998 74.842857 65.699158 121039100
2013-01-08 75.601425 75.984283 74.464287 75.044289 65.875954 114676800
2013-01-09 74.642860 75.001427 73.712860 73.871429 64.846390 101901100
2013-01-10 75.507141 75.531425 73.645714 74.787140 65.650238 150286500
2013-01-11 74.428574 75.045715 74.145714 74.328575 65.247704 87626700
Date Open High Low Close Adj Close Volume
2018-12-31 158.529999 159.360001 156.479996 157.740005 155.405045 35003500
2019-01-02 154.889999 158.850006 154.229996 157.919998 155.582367 37039700
2019-01-03 143.979996 145.720001 142.000000 142.190002 140.085220 91312200
2019-01-04 144.529999 148.550003 143.800003 148.259995 146.065353 58607100
2019-01-07 148.699997 148.830002 145.899994 147.929993 145.740265 54777800
2019-01-08 149.559998 151.820007 148.520004 150.750000 148.518509 41025300
2019-01-09 151.289993 154.529999 149.630005 153.309998 151.040604 45099100
2019-01-10 152.500000 153.970001 150.860001 153.800003 151.523376 35780700
2019-01-11 152.880005 153.699997 151.509995 152.289993 150.035706 27023200
@kesarawimal
kesarawimal / jquery.js
Last active July 1, 2022 16:10
FormSubmit AJAX Documentation: jQuery
// https://api.jquery.com/jQuery.ajax
$.ajax({
method: 'POST',
url: 'https://formsubmit.co/ajax/your@email.com',
dataType: 'json',
accepts: 'application/json',
data: {
name: "FormSubmit",
message: "I'm from Devro LABS"
},
@kesarawimal
kesarawimal / fetch.js
Last active March 5, 2024 00:54
FormSubmit AJAX Documentation: Fetch
// https://github.com/github/fetch
fetch("https://formsubmit.co/ajax/your@email.com", {
method: "POST",
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
name: "FormSubmit",
message: "I'm from Devro LABS"