Skip to content

Instantly share code, notes, and snippets.

View mmanishh's full-sized avatar
🎯
Focusing

manish maharjan mmanishh

🎯
Focusing
View GitHub Profile
@mmanishh
mmanishh / tech_companies_ireland.csv
Last active February 5, 2023 22:25
List of Tech Companies in Ireland
Company Name Company Size Website Company Address
ACI Worldwide Startup https://www.aciworldwide.com/ Lanmark Building, Lonsdale Road, National Technology Park, Limerick
AOL Multinational The Brunel Building Heuston South Quarter, Dublin 8
ATOS Mid-sized Company https://atos.net/ Loughmahon Technology Park, Cork
Action Point Startup https://www.actionpoint.ie/ Lonsdale Road National Technology Park, Limerick
Actus Mobile Solutions Startup Atlas Court, IDA Business Park, Bray, County Wicklow
Acumenx Startup http://www.acumenx.com/ The Rubicon Centre, CIT Campus, Cork
Adobe Multinational 4-6 Riverwalk Citywest Business Campus, Dublin 24
Advanced Manufacturing Control Systems Ltd Mid-sized Company https://www.adobe.com/ie/ Fanningstown Crecora, Co. Limerick
Aetopia Startup https://www.aetopia.com/ ECIT Institute, Belfast
@mmanishh
mmanishh / isset.md
Last active October 18, 2022 11:56

Isset Equivalent in Javascript

Isset in PHP

The isset() function in PHP checks whether a variable is set, which means that it has to be declared and is not NULL. This function returns true if the variable exists and is not NULL, otherwise, it returns false.

// Referencing an undeclared variable
echo json_encode(isset($foo)); // false
$foo = 'bar';
/* eslint-disable no-unused-vars */
/* eslint-disable no-undef */
const request = require('supertest');
const {
expect,
describe,
it,
} = require('@jest/globals');
const app = require('../src/app');
// list all endpoints for express app in node
function print (path, layer) {
if (layer.route) {
layer.route.stack.forEach(print.bind(null, path.concat(split(layer.route.path))))
} else if (layer.name === 'router' && layer.handle.stack) {
layer.handle.stack.forEach(print.bind(null, path.concat(split(layer.regexp))))
} else if (layer.method) {
console.log('%s /%s',
layer.method.toUpperCase(),
path.concat(split(layer.regexp)).filter(Boolean).join('/'))
function commonSubString(arr1, arr2) {
for (const [i, value] of arr1.entries()) {
let isCommon = checkSubString(arr1[i], arr2[i])
console.log(isCommon)
}
}
function checkSubString(s1, s2) {
let shortStr;
let longStr;
var fs = require('fs');
var expect = require('chai').expect;
var { createDirIfNotExists, writeJSON } = require('../writeFile.js');
describe('createDirIfNotExists', function () {
context('without arguments', function () {
it('should throw error if path is null', async function () {
return createDirIfNotExists()
const fs = require('fs');
/*
checks if dir exists , if not create the dir with path passed
@params {String} path : path of dir to check if exists
@returns {Promise} promise : Promise of path of dir created or existed
*/
async function createDirIfNotExists(path) {
if (!path) throw new Error("Path should not be null")
@mmanishh
mmanishh / list_2_node.py
Last active January 5, 2020 16:42
Convert List to LinkedList
class Node:
def __init__(self, val, next_node=None):
self.val = val
self.next_node = next_node
def __repr__(self):
return f'Node({self.val})'
# function to convert normal list to linked list
def from_list(alist):
if len(alist) == 1:
return Node(alist[0])
@mmanishh
mmanishh / ChatMessage.java
Created November 30, 2016 06:06 — forked from puf/ChatMessage.java
Zero to App: Develop with Firebase (for Android - Google I/O 2016)
package com.google.firebase.zerotoapp;
public class ChatMessage {
public String name;
public String message;
public ChatMessage() {
}
public ChatMessage(String name, String message) {
@mmanishh
mmanishh / DividerItemDecoration.java
Created September 7, 2016 12:03 — forked from alexfu/DividerItemDecoration.java
An ItemDecoration that draws dividers between items. Pulled from Android support demos.
/*
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software