Skip to content

Instantly share code, notes, and snippets.

View prosenjit-manna's full-sized avatar
🎯
Focusing

Prosenjit Manna prosenjit-manna

🎯
Focusing
  • Itobuz Technologies
View GitHub Profile
@vdelacou
vdelacou / .eslintignore
Last active May 13, 2024 12:19
React Vite Typescript Eslint
vite.config.ts
src/vite-env.d.ts
dist
@pavankjadda
pavankjadda / Sonarqube with Postgres database using docker.md
Last active June 24, 2024 05:30
Setup Sonarqube with Postgres database using docker

Setup Sonarqube with Postgres database using docker

Both Sonarqube and Postgres database should be same network in order communicate with each other. First create docker network using the following commands

Create docker network

Delete existing docker network and create new docker network sonarqube

docker network rm sonarqube_network
docker network create sonarqube_network

Run PostGres DB container

@ybmadhu
ybmadhu / Jenkinsfile
Created January 7, 2019 18:57 — forked from fabiojose/Jenkinsfile
Sample Jenkinsfile to build, test and deploy Platform-as-Code in Openshift
pipeline {
/* run in any agent (a.k.a. node executor) */
agent any
stages {
stage('Setup') {
steps {
script {
/* Check the GIT_BRANCH to compute the target environment */
if (env.GIT_BRANCH == 'origin/develop' || env.GIT_BRANCH ==~ /(.+)feature-(.+)/) {
@shospodarets
shospodarets / Chrome headless Puppeteer- capture DOM element screenshot using
Last active January 17, 2023 18:52
Chrome headless Puppeteer- capture DOM element screenshot using
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('https://www.chromestatus.com/samples', {waitUntil: 'networkidle'});

https://medium.com/@ExplosionPills/rxjs-switch-switchmap-and-other-map-operations-e8ccdfb7e5a9 is more up-to-date.

Exploring RxJS still feels like a jungle to me. Even when I think I understand something, I find out that I actually don't understand it. In my quest to truly understand it, I end up learning quite a lot more about some other topics or operations than the one I was originally trying to understand. This is generally a positive thing, but it still feels like traveling deep into a jungle to me.

Just today I was trying to learn how to use ngrx/store with ngrx/effects to use http requests with an ngrx/store-backed app. This introduced me to the RxJS Observable switchMap operator that I was not familiar with. The main question I came up with -- the question that I usually have when

@verticalgrain
verticalgrain / share-links.twig
Last active June 25, 2020 09:49
Timber twig wordpress static sharing links
@fernandohu
fernandohu / Reading configuration files before application startup in Angular2 final release.md
Last active July 7, 2024 19:31
Reading configuration files before application startup in Angular2 final release

Reading data before application startup in Angular 2

In this demonstration I will show you how to read data in Angular2 final release before application startup. You can use it to read configuration files like you do in other languages like Java, Python, Ruby, Php.

This is how the demonstration will load data:

a) It will read an env file named 'env.json'. This file indicates what is the current working environment. Options are: 'production' and 'development';

b) It will read a config JSON file based on what is found in env file. If env is "production", the file is 'config.production.json'. If env is "development", the file is 'config.development.json'.

@wpexplorer
wpexplorer / gist:cce8a00830af9d649afd4a0a7e219937
Last active September 24, 2020 23:44
Advanced wp_oembed_get output for videos to add classes & params
// Function
function wpex_video_oembed( $video = '', $classes = '', $params = array() ) {
// Define output
$output = '';
// Sanitize URl
$video = esc_url( $video );
// Video required
@fergalmoran
fergalmoran / home.component.ts
Last active August 21, 2018 03:52
Angular 2 Pusher Service
import * as ng from '@angular/core';
import {PusherService} from '../../services/pusher.service'
@ng.Component({
selector: 'home',
template: require('./home.html')
})
export class Home {
constructor(private pusher: PusherService) {
console.log('Home:constructor');
@alexciesielski
alexciesielski / parse-ionic2.md
Last active September 6, 2019 16:19
Ionic 2 Beta + Parse Server Javascript SDK

Integrate Parse Javascript SDK with Ionic 2 Beta

1 Install dependencies

  • npm install parse --save
  • tsd install parse --save // if you use Typescript

2 Modify the 'scripts' task in gulpfile.js to this:

gulpfile.js