Skip to content

Commit 819370d

Browse files
Merge branch 'master' into branch_anshika
2 parents 36c0210 + 1bf5b5b commit 819370d

File tree

773 files changed

+30555
-2979
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

773 files changed

+30555
-2979
lines changed

.github/workflows/auto-comment.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
name: Auto Comment
2+
on:
3+
pull_request_target:
4+
types: [opened, reopened, synchronize, closed]
5+
permissions:
6+
contents: read
7+
pull-requests: write
8+
issues: write
9+
210
on: [issues, pull_request]
311
permissions: write-all
412
jobs:

.github/workflows/auto-merge.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,22 @@
1+
permissions:
2+
contents: read
3+
pull-requests: write
4+
issues: write
5+
6+
17
name: Auto-Merge PRs
28

9+
# on:
10+
# pull_request:
11+
# types:
12+
# - opened
13+
# - synchronize
14+
15+
316
on:
4-
pull_request:
5-
types:
6-
- opened
7-
- synchronize
17+
pull_request_target:
18+
types: [opened, reopened, synchronize, closed]
19+
820

921
jobs:
1022
auto_merge:
@@ -22,4 +34,5 @@ jobs:
2234
curl -s -X PUT -H "Authorization: token ${{ secrets.AUTOMERGE_TOKEN }}" $PR_URL/merge
2335
fi
2436
env:
25-
GITHUB_TOKEN: ${{ secrets.AUTOMERGE_TOKEN }}
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+

.github/workflows/deploy.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Deploy hacktoberfest-react to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v4
23+
24+
- name: Setup Node.js
25+
uses: actions/setup-node@v4
26+
with:
27+
node-version: '20.19.0'
28+
cache: 'npm'
29+
cache-dependency-path: hacktoberfest-react/package.json
30+
31+
- name: Install dependencies
32+
run: npm install
33+
working-directory: hacktoberfest-react
34+
35+
- name: Build site (Vite)
36+
env:
37+
REPO_NAME: ${{ github.event.repository.name }}
38+
run: npm run build -- --base=/${REPO_NAME}/
39+
working-directory: hacktoberfest-react
40+
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
43+
with:
44+
path: hacktoberfest-react/dist
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
permissions:
2+
contents: read
3+
pull-requests: write
4+
issues: write
5+
6+
7+
8+
# .github/workflows/validate-scripts.yml
9+
name: Validate scripts on PR
10+
11+
on:
12+
pull_request:
13+
types: [opened, synchronize, reopened]
14+
15+
jobs:
16+
validate-scripts:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '18' # LTS
26+
27+
- name: Run scripts validator
28+
run: node tools/validate-scripts.js
29+

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.DS_Store
22
# CONTRIBUTING.md
3-
.github/
3+
# .github/
44
thumbs.db
5+
**/venv/

.vscode/c_cpp_properties.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"configurations": [
33
{
4-
"name": "macos-clang-arm64",
4+
"name": "windows-clang-x64",
55
"includePath": [
66
"${workspaceFolder}/**"
77
],
8-
"compilerPath": "/usr/bin/clang",
8+
"compilerPath": "clang",
99
"cStandard": "${default}",
1010
"cppStandard": "${default}",
11-
"intelliSenseMode": "macos-clang-arm64",
11+
"intelliSenseMode": "windows-clang-x64",
1212
"compilerArgs": [
1313
""
1414
]

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"C_Cpp_Runner.debuggerPath": "lldb",
55
"C_Cpp_Runner.cStandard": "",
66
"C_Cpp_Runner.cppStandard": "",
7-
"C_Cpp_Runner.msvcBatchPath": "",
7+
"C_Cpp_Runner.msvcBatchPath": "C:/Program Files/Microsoft Visual Studio/VR_NR/Community/VC/Auxiliary/Build/vcvarsall.bat",
88
"C_Cpp_Runner.useMsvc": false,
99
"C_Cpp_Runner.warnings": [
1010
"-Wall",

Alphabet.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
public class Alphabet {
2+
3+
public static void main(String[] args) {
4+
5+
char c = '*';
6+
7+
if( (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z'))
8+
System.out.println(c + " is an alphabet.");
9+
else
10+
System.out.println(c + " is not an alphabet.");
11+
}
12+
}

C/Hello_world_Janvi75.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// LANGUAGE: C
2+
// ENV: GCC / Clang
3+
// AUTHOR: Janvi Raj
4+
// GITHUB: https://github.com/Janvi75
5+
6+
#include <stdio.h>
7+
8+
int main() {
9+
printf("Hello, World!\n");
10+
return 0;
11+
}

C/Pass.c

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#include <stdio.h>
2+
#include <stdlib.h>
3+
#include <time.h>
4+
5+
void generatePassword(int length) {
6+
char charset[] = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*?";
7+
int charsetSize = sizeof(charset) - 1; // exclude '\0'
8+
9+
char password[length + 1];
10+
srand(time(NULL)); // seed random number
11+
12+
for (int i = 0; i < length; i++) {
13+
int key = rand() % charsetSize;
14+
password[i] = charset[key];
15+
}
16+
17+
password[length] = '\0'; // null terminate string
18+
19+
printf("🔐 Generated Password: %s\n", password);
20+
}
21+
22+
int main() {
23+
int length;
24+
25+
printf("Enter desired password length: ");
26+
scanf("%d", &length);
27+
28+
if (length < 4) {
29+
printf("Password length should be at least 4 characters!\n");
30+
return 1;
31+
}
32+
33+
generatePassword(length);
34+
35+
return 0;
36+
}

0 commit comments

Comments
 (0)