Skip to content

Instantly share code, notes, and snippets.

View SKumarSpace's full-sized avatar
🌆
Working from the sky

Shrey Kumar SKumarSpace

🌆
Working from the sky
View GitHub Profile
@SKumarSpace
SKumarSpace / test.md
Last active December 11, 2020 20:20
Hello World Markdown

Hello World

This is content converted from Markdown!

Here's a JSON sample:

{
  "foo": "bar"
}
@SKumarSpace
SKumarSpace / test.html
Created December 11, 2020 20:20
Hello World Html
<html>
<head>
<style>
h1 {
font-family: Calibri;
}
</style>
</head>
<body>
<h1>Hello World!</h1>
@SKumarSpace
SKumarSpace / main.go
Created February 19, 2023 05:31
Coldfusion Encrypt Function in Golang
package main
import (
"crypto/aes"
"encoding/base64"
"fmt"
"github.com/andreburgaud/crypt2go/ecb"
"github.com/andreburgaud/crypt2go/padding"
)
@SKumarSpace
SKumarSpace / .npmrc
Created March 27, 2023 00:58
.npmrc - vercel - Azure DevOps
msvs_version=2017
//pkgs.dev.azure.com/{org}/_packaging/{org}/npm/registry/:username=VssSessionToken
; This is an unencrypted authentication token. Treat it like a password. DO NOT share this value with anyone, including Microsoft support.
//pkgs.dev.azure.com/{org}/_packaging/{org}/npm/registry/:_password={pat}
; The npm client won't use username and _password without an email set, but the service doesn't use the email value. The following is an arbitrarily made-up address.
//pkgs.dev.azure.com/{org}/_packaging/{org}/npm/registry/:[email protected]

Benchmark Results

goos: windows
goarch: amd64
pkg: go-struct-benchmarks
cpu: AMD Ryzen Threadripper 3960X 24-Core Processor 

| Benchmark | Iterations | Time/Iteration | Memory/Iteration | Allocs/Iteration |

@SKumarSpace
SKumarSpace / _app.tsx
Created April 6, 2023 15:41
Next.js - Disable SSR
import "../styles/globals.css";
import { LocalAppProps } from "../interfaces";
import ErrorBoundary from "../components/ErrorBoundary";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import Controller from "../components/Controller";
const queryClient = new QueryClient();
export default function MyApp({ Component, pageProps }: LocalAppProps) {
return (
@SKumarSpace
SKumarSpace / Program.cs
Created July 3, 2023 16:09
Pass C# Property via LINQ
using System;
using System.Collections.Generic;
using System.Linq;
namespace PassPropertyTests
{
public class BaseObject
{
public string Name { get; set; }
public string Email { get; set; }
@SKumarSpace
SKumarSpace / script.sh
Created July 3, 2023 18:33
Github - Commit in the Past
git add .
git commit --date='2020-10-09 00:00:00' -m "initial commit"
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'
git push -f
@SKumarSpace
SKumarSpace / a.js
Created July 18, 2023 18:07
cool fetch
function myCoolFetch(url: string): Promise<Response> {
// Simulating an asynchronous operation
return new Promise<Response>((resolve, reject) => {
// Simulating a delay before resolving the promise
setTimeout(() => {
// Create a mock response object
const response: Response = {
status: 200,
statusText: "OK",
ok: true,
@SKumarSpace
SKumarSpace / package.json
Created July 23, 2023 17:20
Typescript Project Init - Basic
{
"main": "dist/index.js",
"scripts": {
"build": "npx tsc && node dist/index.js"
},
"devDependencies": {
"typescript": "^4.9.5"
}
}