Skip to content

Instantly share code, notes, and snippets.

View ik04's full-sized avatar
💭
Ever Evolving

Ishaan Khurana ik04

💭
Ever Evolving
View GitHub Profile
@ik04
ik04 / skeletonenv.sh
Last active October 6, 2025 09:02
hollows out .env files to make .env.example files
#!/usr/bin/env bash
if [ $# -eq 0 ]; then
echo "Usage: $0 .env .env.local .env.production ..."
exit 1
fi
for file in "$@"; do
if [ ! -f "$file" ]; then
echo "$file not found!"
@ik04
ik04 / snippet
Last active September 23, 2024 09:19
snip
#include <stdio.h>
#include <pthread.h>
#define NUM_THREADS 3
int je, jo, evensum = 0, sumn = 0, oddsum = 0, evenarr[50], oddarr[50];
void *Even(void *threadid) {
int i, n;
je = 0;
n = (int)threadid;
for (i = 1; i <= n; i++) {
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void getStringInput(char *prompt, char *str, int size) {
printf("%s", prompt);
fgets(str, size, stdin);
str[strcspn(str, "\n")] = 0;
}
@ik04
ik04 / shell_code_analysis.nasm
Last active November 17, 2023 06:18
sheellcode-analysis-os
section .text
global _start
_start:
xor rax, rax
xor rdx, rdx
push rax
@ik04
ik04 / mess.sh
Created August 3, 2023 13:46
allows me to look up ther mess menu for the current day
#!/bin/bash
# Get the current day of the week (lowercase)
current_day=$(date +"%A" | tr '[:upper:]' '[:lower:]')
# Define the menu JSON data
is_jq_installed() {
command -v jq >/dev/null 2>&1
}
@ik04
ik04 / laravel_init.sh
Last active December 4, 2023 02:30
laravel installation
#!/bin/bash
sudo apt update
sudo apt install -y php php-cli php-mbstring php-xml php-zip php-bcmath php-mysql php-sqlite3
sudo apt install composer
echo 'export PATH="$PATH:$COMPOSER_HOME/vendor/bin"' >>~/.bashrc
source ~/.bashrc
composer global require laravel/installer
@ik04
ik04 / nvm_init.sh
Created July 30, 2023 17:55
nvm init script
#!/bin/bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
exit 0