Skip to content

Instantly share code, notes, and snippets.

@sufiiiyan
sufiiiyan / regex cases.md
Last active February 21, 2024 08:24
Regex
  1. Useful regex
  2. Playground
  3. Resource
  4. Working url and number range

Useful regex

# Title regex Description/notes
1 Regex to allow alphanumeric, spaces, some special characters ^(?!\d+$)(?:[a-zA-Z0-9][a-zA-Z0-9 @&$]*)?$ not allowing only number
^(?!$)(?:[A-Za-z0-9][A-Za-z0-9 @&$,.?_-]*)?$ getting invalid character class due to -
import {Component, OnInit, Renderer2} from '@angular/core';
import {NgbActiveModal} from '@ng-bootstrap/ng-bootstrap';
import {ThemeService} from 'src/app/services/theme.service';
import { InspaaceStorageService } from 'src/app/services/inspaace-storage.service';
import { InspaaceHttpService } from 'src/app/services/inspaace-http.service';
@Component({
selector: 'app-display-setting',
templateUrl: './display-setting.component.html',
styleUrls: ['./display-setting.component.css']
@sufiiiyan
sufiiiyan / new.js
Last active April 7, 2020 07:07 — forked from rishabhmhjn/tweetLinky.js
This is an AngularJS filter to linkify #hashtags and @mention texts into respective Twitter URLsDemo - http://plnkr.co/edit/vrdgxU?p=preview
app.filter('hashtags',['$filter', '$sce',
function($filter, $sce) {
return function(text, target, type) {
if (!text) return text;
var replacedText = $filter('linky')(text, target);
var targetAttr = "";
if (angular.isDefined(target)) {
targetAttr = ' target="' + target + '"';
}
if(type === 'twitter'){
@sufiiiyan
sufiiiyan / filesLib.md
Created March 30, 2020 07:29
table search sorting

npm i ng2-search-filter --save npm install ng2-order-pipe --save

{ "name": "search-sort-pagination-angular2", "version": "0.0.0", "license": "MIT", "scripts": { "ng": "ng", "start": "ng serve",

@sufiiiyan
sufiiiyan / sql-mongo_comparison.md
Created March 30, 2020 07:21 — forked from aponxi/sql-mongo_comparison.md
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@sufiiiyan
sufiiiyan / angular7Package.json
Created March 28, 2020 16:41
angular 7 package
{
"name": "inspaacevideo",
"version": "0.0.0",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e",
@sufiiiyan
sufiiiyan / payment.component.css
Created October 4, 2019 05:34 — forked from shah-smit/payment.component.css
Stripe Payment into Angular 4
* {
font-family: "Helvetica Neue", Helvetica;
font-size: 15px;
font-variant: normal;
padding: 0;
margin: 0;
}
html {
height: 100%;
@sufiiiyan
sufiiiyan / livestream.component.ts
Created October 4, 2019 05:29 — forked from shah-smit/livestream.component.ts
Angular 4, Live Streaming
import { Component, OnInit, OnDestroy } from '@angular/core';
import { Router } from '@angular/router';
import { LoginService, AzureService } from '../services'
import { User, LiveSession } from '../models'
import { SharedService } from "app/services/shared.service";
//declare var SimpleWebRTC;
declare var io;
declare var conference;
@Component({
@sufiiiyan
sufiiiyan / config.xml
Created April 7, 2017 14:26
keyboard test
<preference name="KeyboardDisplayRequiresUserAction" value="false" />