Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I only talk to Dark Mode users

Dushyant Pathak dkp1903

💭
I only talk to Dark Mode users
View GitHub Profile
View Free O'Reilly Books.md

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
View mongodb_cheat_sheet.md

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

View cron.js
"use strict";
const puppeteer = require("puppeteer");
const cheerio = require("cheerio");
module.exports = {
"0 */24 * * *": async (date) => {
const browser = await puppeteer.launch({
args: ["--no-sandbox", "--disable-setuid-sandbox", "--lang=fr-FR"],
});
const page = await browser.newPage();
View MapView-index.js
import React, { Component} from 'react';
import ReactMapGL, {Marker, Popup } from 'react-map-gl';
import { SERVER_URL } from '../../utils/constants';
class MapView extends Component
{
async componentDidMount() {
View candlestick.component.ts
import { Component, OnInit } from '@angular/core';
import { LiveMarketDataService } from '../../live-market-data.service';
@Component({
selector: 'app-candlestick',
templateUrl: './candlestick.component.html',
styleUrls: ['./candlestick.component.css']
})
export class CandlestickComponent implements OnInit {
View candlestick.component.html
<select (change)="selectChangeHandler
($event)">
<option selected="selected" value="IBM">IBM</option>
<option value="WMT">Walmart</option>
<option value="BABA">Alibaba</option>
<option value="SNAP">Snap Inc</option>
<option value="AAPL">Apple</option>
<option value="NFLX">Netflix</option>
<option value="TWTR">Twitter</option>
<option value="AMZN">Amazon</option>
View candlestick.component.html
<div id='abc'>
<!-- <select (change)="selectChangeHandler
($event)">
<option selected="selected" value="IBM">IBM</option>
<option value="WMT">Walmart</option>
<option value="BABA">Alibaba</option>
<option value="SNAP">Snap Inc</option>
<option value="AAPL">Apple</option>
<option value="NFLX">Netflix</option>
<option value="TWTR">Twitter</option>
View candlestick.component.css
.dropdown:hover .dropdown-content { display: block; border-radius: 5px;}
.wrapper{
display: grid;
grid-template-columns:20% 80%;
grid-gap: 5em;
}
View candlestick.component.css
.dropdown:hover .dropdown-content { display: block; border-radius: 5px;}
.wrapper{
display: grid;
grid-template-columns:20% 80%;
grid-gap: 5em;
}
View candlestick.component.css
.dropdown:hover .dropdown-content { display: block; border-radius: 5px;}
::ng-deep .chart {
background-color: rgb(68, 117, 117) !important;
color: rgb(252, 252, 252) !important;
}
.btn:hover{
font-weight:700;
}