Skip to content

Instantly share code, notes, and snippets.

View rajvijen's full-sized avatar
🏠
Working From Home

Vijendra Kumar rajvijen

🏠
Working From Home
View GitHub Profile
@awesomebytes
awesomebytes / code_connect_via_command_line.md
Last active March 26, 2024 09:54
How to open Visual Studio Code via command line (local file, remote-ssh, docker, remote-docker)

How to open Visual Studio Code via command line

In order to open a Visual Studio Code sometimes we want to do it from the command line. Either because that allows us to just open the current file or folder, or because we would like to script opening some specific resource. This resource may be placed in another machine (e.g. via ssh), or in a docker container (running in the same machine or in another machine).

Local file or folder

code <file or folder>
# e.g. code .

C++ OOPS Concepts

The main aim of OOP is to bind together the data and the functions that operate on them so that no other part of the code can access this data except that function.

Characteristics of an Object Oriented Programming language

img

@ranjithkumar8352
ranjithkumar8352 / smsClient.js
Last active July 26, 2023 19:23
Send TextLocal SMS using Node.js
//This code was posted for an article at https://codingislove.com/send-sms-developers/
const axios = require("axios");
const tlClient = axios.create({
baseURL: "https://api.textlocal.in/",
params: {
apiKey: "YOUR API KEY", //Text local api key
sender: "6 CHARACTER SENDER ID"
}
@marek-panek
marek-panek / SonarQubeConfig.txt
Last active May 20, 2023 13:15
SonarQube configuration with PostgreSQL
1. In PostgreSQL database
1.1 Create user
create user <user_name> with password '<password>';
1.2 Create database
create database <db_name> with owner <user_name> encoding 'UTF8';
2. Edit <sonar_install_dir>/conf/sonar.properties
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 27, 2024 15:21
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@bitliner
bitliner / test_api_with_authentication.js
Last active July 18, 2020 07:56 — forked from bq1990/gist:595c615970250e97f3ea
Supertest authenticate with bearer token
'use strict';
var should = require('should');
var app = require('../../app');
var request = require('supertest')(app);
describe('GET /api/incidents', function() {
it('should require authorization', function(done) {
request
@vasanthk
vasanthk / System Design.md
Last active April 26, 2024 18:05
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@davemackintosh
davemackintosh / map-to-json.js
Last active August 7, 2023 15:49
Convert ES6 `Map`s to a standard JSON object without effing Babel.
/**
* Convert a `Map` to a standard
* JS object recursively.
*
* @param {Map} map to convert.
* @returns {Object} converted object.
*/
function map_to_object(map) {
const out = Object.create(null)
map.forEach((value, key) => {
@joyrexus
joyrexus / README.md
Last active January 21, 2024 21:51 — forked from btoone/curl.md
curl tutorial

An introduction to curl using GitHub's API.

Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin

Includes HTTP-Header information in the output