Skip to content

Instantly share code, notes, and snippets.

😃
Junior dev for life

Hiren Chauhan hirenchauhan2

😃
Junior dev for life
Block or report user

Report or block hirenchauhan2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hirenchauhan2
hirenchauhan2 / findstrings.md
Last active Sep 24, 2018
Command to find multiple string in multiple files by using 2 files.
View findstrings.md

Command to find multiple string in multiple files by using 2 files.

  1. file for string to search -- stringlist
  2. file to list the files from which the string should be searched
  3. Output file where the occurences of strings will be stored with line number of source file and the string containing it.
findstr /g:stringlist.txt /f:filelist.txt > results.out
@hirenchauhan2
hirenchauhan2 / Oracle Query Execution Steps.md
Last active May 2, 2018
How Oracle Query is executed in steps
View Oracle Query Execution Steps.md

How the SQL SELECT Query is exceuted in Oracle

Consider the following SQL Query

SELECT
  deptno,
  sum(sal) total_salary
FROM
  emp
@hirenchauhan2
hirenchauhan2 / install_ora_jdbc_driver_maven.bat
Created Apr 5, 2018
Install Oracle JDBC Driver in maven repository
View install_ora_jdbc_driver_maven.bat
mvn install:install-file -Dfile=C:\ojdbc7.jar -DgroupId=com.oracle.jdbc -DartifactId=ojdbc7 -Dversion=12.1.0.1 -Dpackaging=jar
@hirenchauhan2
hirenchauhan2 / QuickSort.js
Created Feb 19, 2018
Quicksort algorithm in Javascript
View QuickSort.js
/***
* Quicksort Algorithm
**/
const quickSort = (arr) => {
if (arr.length <= 1)
return arr
else {
const len = arr.length
const pivot = arr[Math.floor(len / 2)];
return [].concat(
@hirenchauhan2
hirenchauhan2 / generate self signed ssl certs.md
Last active Nov 13, 2017
Steps for how to generate self signed ssl certificated for HTTPS
View generate self signed ssl certs.md

How to create a self-signed SSL Certificate ...

... which can be used for testing purposes or internal usage

Overview

The following is an extremely simplified view of how SSL is implemented and what part the certificate plays in the entire process.

Normal web traffic is sent unencrypted over the Internet. That is, anyone with access to the right tools can snoop all of that traffic. Obviously, this can lead to problems, especially where security and privacy is necessary, such as in credit card data and bank transactions. The Secure Socket Layer is used to encrypt the data stream between the web server and the web client (the browser).

@hirenchauhan2
hirenchauhan2 / totalTime.js
Last active Sep 26, 2017
Calculate total time from the given times (minutes, seconds) format
View totalTime.js
/**
* Calculate total time from the given times (minutes, seconds) format
* seperated via |
* Show total hours, total minutes, and total seconds
*/
const str = "4,13|3,3|5,27|5,4|5,57|6,20|5,2|2,36|6,21|5,47|14,58|5,59|4,3|5,54|3,57|9,31|3,48|8,1|17,0|13,15|8,30|18,30|10,14|4,28|8,38|16,50|15,1|2,30|14,8|13,5"
// remove the | and make an array
let strippedStr = str.split('|')
// console.log(strippedStr)
You can’t perform that action at this time.