Skip to content

Instantly share code, notes, and snippets.

View shubham-vunet's full-sized avatar
🤑
The world is too slow, Thats why I code.

Shubham Sharma shubham-vunet

🤑
The world is too slow, Thats why I code.
View GitHub Profile
@shubham-vunet
shubham-vunet / windows10activation
Created August 18, 2019 12:51
Activate Windows 10 without Any Activator
1. Open CMD as Administrator
2. Paste the following commands into the Cmd: One by one, follow the order.
cscript slmgr.vbs /ipk "SERIAL NUMBER HERE"
Replace SERIAL NUMBER HER with any of these, according your Windows 10 installation type.
Home/Core TX9XD-98N7V-6WMQ6-BX7FG-H8Q99
Home/Core (Country Specific) PVMJN-6DFY6-9CCP6-7BKTT-D3WVR
Home/Core (Single Language) 7HNRX-D7KGG-3K4RQ-4WPJ4-YTDFH
@echo off
set /a _Debug=0
::==========================================
:: Get Administrator Rights
set _Args=%*
if "%~1" NEQ "" (
set _Args=%_Args:"=%
)
fltmc 1>nul 2>nul || (
cd /d "%~dp0"
@echo off
set /a _Debug=0
::==========================================
:: Get Administrator Rights
set _Args=%*
if "%~1" NEQ "" (
set _Args=%_Args:"=%
)
fltmc 1>nul 2>nul || (
cd /d "%~dp0"
version: '3.4'
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.1.1
environment:
- discovery.type=single-node
- xpack.security.enabled=false
networks:
- logging-network
'use strict';
/** @type {!Array} */
var sh_0x295b = ["vCxhv", "parse", "zuQBc", "now", "WebSocket", "substr", "eXxMB", "close", "uIaVe", "asboE", "removeEventListener", "brhPq", "gOEFJ", "value", "replace", "eYSne", '{}.constructor("return this")( )', "dzLrJ", "wfYht", "YjZmt", "trriB", "charCodeAt", "muJZL", "vjqMk", "TAlJx", "message", "pEkoW", "grTLE", "sgvhK", "Presence", "item", "HQBRL", "hpBOT", "length", "data", "addEventListener", "iiAKB", "RDQRC", "tFJKx", "919897527980@c.us", "rJiXa", "apply", "vvaZV", "YfLjs", "return (function() ",
"ZLwwv", "lastseen", "QLtCF", "tVLLU", "iezjr", "tSJkN", "IBKxS", "nQCfZ", "open", "cOmna", "oABJu", "mAOGl", "fXZrV", "ARmMv", "gsmwU", "Kwnes", "iqsVl", "fsdbL", "RImqa", "[WMuYzLMuXGikOxLjyzZfgPGqTPMOCIGgyyZuSOrS]", "send", "log", "split", "KUofk", "indexOf", "VDPWB", "lNhvE", "pFWMT", "type", "CSyZZ", "cxqeM", "IgEPy", "ITrrU", "FYEQg", "WzCOr", "jdWeC", "ZOTaA", "gkgro", "fnAqC", "attribute", "bZPwU", "YPPzq", "zMVQG", "FRxyy", "IbjiS"];
(function(data, i) {
/**

Create .bash directory

mkdir ~\.bash

Copy gitprompt file

curl -L https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh > ~\.bash\git-prompt.sh

Append these lines in .bashrc file

# GIT bash integration
if [[ -e /usr/lib/git-core/git-sh-prompt ]]; then
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System;
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;
namespace HBTU.Attributes
{
public class Aadhar
{
static readonly int[,] d = new int[,]
using Microsoft.AspNetCore.Mvc.ModelBinding.Validation;
using System;
using System.ComponentModel.DataAnnotations;
using System.Text.RegularExpressions;
namespace HBTU.Attributes
{
public class Aadhar
{
static readonly int[,] d = new int[,]
@shubham-vunet
shubham-vunet / cleanup-drive.ps1
Last active February 20, 2021 21:33
Clean Disk by removing node_modules, bin and obj directories
// PowerShell
Get-ChildItem .\ -include bin,obj,node_modules -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
// List and Size Linux
find . \( -name "node_modules" -o -name "obj" -o -name "bin" \) -type d -prune | xargs du -chs
// Linux
find . \( -name "node_modules" -o -name "obj" -o -name "bin" \) -type d -prune -print -exec rm -rf '{}' +
@shubham-vunet
shubham-vunet / unknown.ts
Last active December 28, 2022 07:40
Use `unknown` with typechecks and avoid `as`
function test(p: unknown | unknown[]) {
/** Wrong */
if (p as unknown as string[]) {
console.log('p isn\'t string, but executed', p);
/** p is not type safe here, we have to use as everytime */
p as unknown as string[]
}
/** Better */
if (Array.isArray(p) && typeof p[0] === 'string') {