Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Prashant Singh prashant1k99

🏠
Working from home
Block or report user

Report or block prashant1k99

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
@prashant1k99
prashant1k99 / regexp.js
Created Nov 29, 2019
Using RegExp in JS
View regexp.js
//RegExp for URL validation - ^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$
let exp = ^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$;
function testInfo(phoneInput) {
var OK = exp.exec(phoneInput.value);
if (!OK)
window.alert(phoneInput.value + ' isn\'t a phone number with area code!');
else
window.alert('Thanks, your phone number is ' + OK[0]);
}
View async-1.js
async function f() {
return 1;
}
f().then(alert); // 1
View alt-promises.js
var promise = new Promise(function(resolve, reject) {
throw new Error('Some error has occured')
})
promise
.then(function(successMessage) {
console.log(successMessage);
})
.catch(function(errorMessage) {
//error handler function is invoked
View gist-embed-dark.css
/* Gist Embed - Dark Theme Styling - Thanks to MattD */
/* Body */
.gist-data tbody { background-color: Black; }
/* Line Numbers */
.gist-data tbody td:nth-of-type(1) {
color: #2B91AF !important;
}
View quicksort.c
# include <conio.h>
# include <stdio.h>
void main(){
int n, a[20], min, max, i;
// Created a function to sort the array
int sortArray(a[20], min, max);
// For scanning the total number of elements in unsorted array
@prashant1k99
prashant1k99 / README.md
Created May 24, 2019 — forked from hofmannsven/README.md
SCSS Cheatsheet
View README.md
@prashant1k99
prashant1k99 / vsCodeOpenFolder.reg
Created May 7, 2019
To add the feature of Right click to File and/or Folder to Open With VSCode..
View vsCodeOpenFolder.reg
Windows Registry Editor Version 5.00
; Open files
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code]
@="Edit with VS Code"
; Find the root installation files of the VS Code.
; Example -
"Icon"="C:\\Program Files\\Microsoft VS Code\\Code.exe,0"
[HKEY_CLASSES_ROOT\*\shell\Open with VS Code\command]
@="\"C:\\Program Files\\Microsoft VS Code\\Code.exe" \"%1\""
; This will make it appear when you right click ON a folder
@prashant1k99
prashant1k99 / meta-tags.md
Created Apr 23, 2019 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags
View meta-tags.md

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@prashant1k99
prashant1k99 / generate-certificates.sh
Created Apr 21, 2019 — forked from bjanderson/generate-certificates.sh
Generate self-signed ssl certificates.
View generate-certificates.sh
#!/bin/bash
# set values for certificate DNs
# note: CN is set to different values in the sections below
ORG="000_Test_Certificates"
# set values that the commands will share
VALID_DAYS=360
CA_KEY=ca.key
CA_CERT=ca.crt
@prashant1k99
prashant1k99 / Editor.vue
Created Apr 5, 2019 — forked from vielhuber/Editor.vue
TinyMCE vanilla js vue js #js
View Editor.vue
<template>
<div>
<editor v-model="editorModel" :init="tinyMceConfiguration"></editor>
{{ editorData }}
</div>
</template>
<script>
/* core */
import tinymce from 'tinymce/tinymce';
You can’t perform that action at this time.