Skip to content

Instantly share code, notes, and snippets.

View himanshuteotia's full-sized avatar
🎯
Focusing

Himanshu Teotia himanshuteotia

🎯
Focusing
  • Delhi
View GitHub Profile
@himanshuteotia
himanshuteotia / Create hot fix steps
Last active August 18, 2021 10:23
Create PR for hot fixes
You can follow this steps;
1. checkout to stage and ensure that you have the latest code
2. checkout to live and ensure you have the latest code
3. create a new branch from live , you can call it hot-fix-<simple name of the changes> e.g. "hot-fix-user-rb-api"
4. cherry-pick each of the commits you want from stage into the new branch you created (you can get the commit ids from the PR that contains the changes you want to hot fix)
5. Create a PR from the hot-fix branch -> live
test('creates Contract on correct date', () => {
const NOW = '2019-05-03T08:00:00.000Z';
const mockDateNow = jest
.spyOn(global.Date, 'now')
.mockImplementation(() => new Date(NOW).getTime());
const mutation = `
mutation createContract {
createContract {
startedOn
import { Connection, createConnection } from 'mongoose'
// import { log } from './logger'
const connectionOptions = {
dbName: 'app'
}
const MONGO_URL: string = process.env.MONGO_URL
console.log('MONGO_URL: ', MONGO_URL)
export const db: Connection = createConnection(MONGO_URL, connectionOptions)
What is FULL-TEXT SEARCH? What does FULL-TEXT SEARCH mean? FULL-TEXT SEARCH meaning - FULL-TEXT SEARCH definition - FULL-TEXT SEARCH explanation.
In text retrieval, full-text search refers to techniques for searching a single computer-stored document or a collection in a full text database. Full-text search is distinguished from searches based on metadata or on parts of the original texts represented in databases (such as titles, abstracts, selected sections, or bibliographical references).
In a full-text search, a search engine examines all of the words in every stored document as it tries to match search criteria (for example, text specified by a user). Full-text-searching techniques became common in online bibliographic databases in the 1990s. Many websites and application programs (such as word processing software) provide full-text-search capabilities. Some web search engines, such as AltaVista, employ full-text-search techniques, while others index only a portion of the web pages examined by their in

After this command we dont need add sudo before docker command in linux

sudo chmod 666 /var/run/docker.sock

Rasa docker

docker run -v myrasa:/app rasa/rasa init --no-prompt

@himanshuteotia
himanshuteotia / login with csrf token
Created August 22, 2019 03:31
Login through coding (csrf token + cookies )
const request = require('request-promise');
const cheerio = require('cheerio');
(async () => {
console.log(`Initial request to get the csrf_token value..`);
let initialRequest = await request({
uri:'http://quotes.toscrape.com/login',
method: 'GET',
@himanshuteotia
himanshuteotia / combine.js
Created May 30, 2019 09:42
combine multiple xlsx files in a directory and save them into one file
var xlsx = require("xlsx");
var fs = require("fs");
function readFileToJson(filename) {
var wb = xlsx.readFile(filename);
var firstTabName = wb.SheetNames[0];
var ws = wb.Sheets[firstTabName];
var data = xlsx.utils.sheet_to_json(ws);
return data;
}
let express = require("express");
let request = require("request");
const ffmpeg = require("fluent-ffmpeg");
const fs = require("fs");
let track =
"https://cdn.fbsbx.com/v/t59.3654-21/52113399_803146416702766_1003332990597595136_n.mp4/audioclip-1551778334000-1950.mp4?_nc_cat=105&_nc_ht=cdn.fbsbx.com&oh=07e065c73899d3dd825828f4ce019138&oe=5C80FE67"; //your path to source file
async function createFile(track) {
new Promise((resolve, reject) => {
ffmpeg(track)
@himanshuteotia
himanshuteotia / whatsapp.js
Last active April 11, 2022 13:29
Whatsapp script to automate the messages whenever person come online it will start sending the messages
let onlineClass = "YmixP";
let start = true;
let replyMessages = ["Hi", "Hello"];
let deleteClass = "SgIJV"
// Replace My Contact Name with the name
// of your WhatsApp contact or group e.g. title="Rahul"
let name = "Mummy";
setInterval(() => {