Skip to content

Instantly share code, notes, and snippets.

View nikiljos's full-sized avatar
:octocat:
Always Learning....

Nikhil Jose nikiljos

:octocat:
Always Learning....
View GitHub Profile
const threadKey=(Math.random() + 1).toString(36).substring(2)
const calendarBaseURL="https://links.nikjos.in/cp"
const kontestAPI="https://kontests.net/api/v1/"
const dayBuffer=1
function scrapAndNotify() {
// checkLeetcode()
// checkCodechef()
body{
position: absolute;
margin: auto;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
border-radius:25px;
}
class WayOne {
String name;
// ! its better is initalize variable with final if you are using like this.
final String age;
// ! use _ to make private
final String _batch;
// ? you can pass data like this
WayOne(this.name, this.age, this._batch);
const express = require("express");
const app = express();
app.get("/", function(req, res) {
res.send("Server is running")
})
app.listen(5000, function() {
console.log("server running")
})
body{
height:100vh;
background-image:linear-gradient(to bottom right,rgba(126,213,111,0.7) , rgba(40,180,133,0.7));
}
::-moz-selection { /* Code for Firefox */
background: #90cf8c8c;
}
::selection {
background: #90cf8c8c;
}
for (event_name of ["visibilitychange", "webkitvisibilitychange", "blur"]) {
window.addEventListener(event_name, function(event) {
event.stopImmediatePropagation();
}, true);
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.3/dist/css/bootstrap.min.css" integrity="sha384-TX8t27EcRE3e/ihU7zmQxVncDAy5uIKz4rEkgIXeMed4M0jlfIDPvg6uqKI2xXr2" crossorigin="anonymous">
@nikiljos
nikiljos / center.css
Created November 6, 2020 13:16
To position a div in the exact center of a web page.
div{
position: absolute;
margin-top: auto;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
}