- Couch DB
- Mongo DB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fetch = require("node-fetch"); | |
| const cheerio = require("cheerio"); | |
| const fs = require("fs"); | |
| const URL_SPI = "https://www.spicinemas.in/chennai/now-showing"; | |
| const URL_JAZZ = "https://www.jazzcinemas.com/Home/Imax"; | |
| const MOVIE_NAME = "Avenger"; | |
| const TELEGRAM_TOKEN = "889146735:AAHDjtj25FzbzX8Vn3-Qn_pKF5GmTfHakrI"; | |
| const users = ["-1001377428428"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["plugin-a"]=t():e["plugin-a"]=t()}(window,(function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:functio |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Generate self signed root CA cert | |
| openssl req -nodes -x509 -newkey rsa:2048 -keyout ca.key -out ca.crt -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=root/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com" | |
| # Generate server cert to be signed | |
| openssl req -nodes -newkey rsa:2048 -keyout server.key -out server.csr -subj "/C=AU/ST=NSW/L=Sydney/O=MongoDB/OU=server/CN=`hostname -f`/emailAddress=kevinadi@mongodb.com" | |
| # Sign the server cert |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # git | |
| alias gac="git add . && git commit -a -m " # Add all changes and commit | |
| alias gst="git status -sb" # Show branch status | |
| alias glog="git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" # Brnach commit logs | |
| alias gdm="!git branch --merged | grep -v '*' | xargs -n 1 git branch -d" # Delete merged branch | |
| alias gco="git checkout origin" # Checkout to branch from origin | |
| alias grbm="git rebase master" # Rebase branch with master | |
| alias grc="git rebase --continue" # Continue rebase | |
| alias gpm="git checkour origin master && git pull origin master" # Get latest master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const axios = require('axios'); | |
| const app = express(); | |
| const getRandomQuote = async () => { | |
| try { | |
| const {data} = axios.fetch('https://uselessfacts.jsph.pl/random.json'); | |
| return data; | |
| } catch (e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "request": "launch", | |
| "name": "Launch Program", | |
| "skipFiles": [ | |
| "<node_internals>/**" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const express = require('express'); | |
| const axios = require('axios'); | |
| const app = express(); | |
| const getRandomQuote = async () => { | |
| try { | |
| const {data} = await axios.get('https://uselessfacts.jsph.pl/random.json'); | |
| return data; | |
| } catch (e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Before | |
| const isDateValid = (startDate, endDate) => { | |
| const nowUTC = moment.utc(); | |
| const startDateUTC = moment.utc(startDate); | |
| const endDateUTC = moment.utc(endDate); | |
| return ( | |
| moment.utc(nowUTC).isAfter(startDateUTC) && | |
| moment.utc(nowUTC).isBefore(endDateUTC) | |
| ); |