This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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!" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
section .text | |
global _start | |
_start: | |
xor rax, rax | |
xor rdx, rdx | |
push rax |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |