Skip to content

Instantly share code, notes, and snippets.

View CryogenicPlanet's full-sized avatar
⚒️
Building something new

Rahul Tarak CryogenicPlanet

⚒️
Building something new
View GitHub Profile
{
"nodes": [
{
"nodeId": "4",
"ignored": false,
"role": {
"type": "internalRole",
"value": "RootWebArea"
},
"chromeRole": {
@CryogenicPlanet
CryogenicPlanet / zpp.ts
Created June 21, 2023 15:28
Extend zod functionality by wrapping it
/* eslint-disable @typescript-eslint/ban-ts-comment */
import endent from "endent";
import { type z, type ZodRawShape } from "zod";
export const zpp = <Out, Def extends z.ZodTypeDef, In>(
schema: z.Schema<Out, Def, In>
) => {
const newFunc = (obj: z.infer<typeof schema>) => {
return obj;
};
@CryogenicPlanet
CryogenicPlanet / .eslintrc
Created June 6, 2021 12:29
Typescript Mono Repo Guide
// .eslintrc
{
"env": {
"browser": true,
"es6": true,
"node": true
},
"extends": [
"react-app",
"plugin:react/recommended",
@CryogenicPlanet
CryogenicPlanet / sharedFolder.sh
Created March 7, 2021 23:10
Create Shared Folders
sudo groupadd eng
sudo useradd -g eng deploy
sudo mkdir -p /home/eng
sudo chgrp -R eng /home/eng
sudo chmod -R 2775 /home/eng
for ID in $(cat /etc/passwd | grep /home | cut -d ':' -f1); \
do (adduser $ID eng; ln -s /home/eng /home/$ID);done
@CryogenicPlanet
CryogenicPlanet / async-redis+1.1.7.patch
Created February 22, 2021 23:54
Async Redis Patch
diff --git a/node_modules/async-redis/yarn.lock b/node_modules/async-redis/yarn.lock
index c5fc73d..6ba2d3a 100644
--- a/node_modules/async-redis/yarn.lock
+++ b/node_modules/async-redis/yarn.lock
@@ -629,6 +629,11 @@ delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
+denque@^1.4.1:
+ version "1.5.0"
@CryogenicPlanet
CryogenicPlanet / react-push-notification+1.3.0.patch
Created February 14, 2021 00:26
react-push-notification patch
diff --git a/node_modules/react-push-notification/dist/notifications/Notifications.js b/node_modules/react-push-notification/dist/notifications/Notifications.js
index 0f14e14..c4dbf28 100644
--- a/node_modules/react-push-notification/dist/notifications/Notifications.js
+++ b/node_modules/react-push-notification/dist/notifications/Notifications.js
@@ -1,12 +1,13 @@
-"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
-Object.defineProperty(exports, "__esModule", { value: true });
@CryogenicPlanet
CryogenicPlanet / shellConfig.sh
Created November 5, 2020 19:56
Default Shell Config
# This file will setup the default config that @CryogenicPlanet uses across machines
yes | sudo apt install zsh
yes | sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
git clone https://github.com/denysdovhan/spaceship-prompt.git "$ZSH_CUSTOM/themes/spaceship-prompt" --depth=1
ln -s "$ZSH_CUSTOM/themes/spaceship-prompt/spaceship.zsh-theme" "$ZSH_CUSTOM/themes/spaceship.zsh-theme"
source ~/.zshrc
echo "Setting Vim config"
wget https://missing.csail.mit.edu/2020/files/vimrc
mv vimrc ~/.vimrc
echo "Manually Set .zshrc theme to spaceship"
@CryogenicPlanet
CryogenicPlanet / spine-gpt3.txt
Created July 26, 2020 22:35
Conversations with GPT-3 to fix the Spine
The following is a conversation with an AI assistant. The assistant is helpful, creative, clever, and very friendly.
Human: Hello, who are you?
AI: I am an AI created by OpenAI. How can I help you today?
Human: Can you help me debug an SSL configuration error?
AI: Sure. What's wrong?
Human: When I open the website, it shows 'ERR_SSL_PROTOCOL_ERROR'
AI: The server's TLS configuration does not support the protocol you are trying to use.
Human: How do I fix that?
AI: Check your server's configuration. Make sure that TLSv1.0 or TLSv1.1 is supported.
// Functions
let tweetParser = async function (tweetDom) {
let tweetContent = tweetDom.innerText;
let tweet = {
name: "",
username: "",
time: "",
content: "",
interaction: {
reply: "",
@CryogenicPlanet
CryogenicPlanet / A3_custom_checker.c
Created April 2, 2020 13:22
I didn't fully make this checker, infact I only helped build the auto check infrastructure a friend made most of the cases
#include<stdio.h>
#include<stdlib.h>
#include"ingredient_graph.c"
int output_check(intNode *head, intNode *checkAgainst){
// Function aims to autocheck the printed outputs
if(head == NULL){
return 1; // Failed
}