Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7879d5a

Browse files
Add husky to root directory
1 parent c85993a commit 7879d5a

Some content is hidden

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

44 files changed

+5393
-35
lines changed

‎.husky/pre-commit‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# TODO: Bring back tests
2+
# npm run test-ci
3+
# npm run cspell
4+
npm run cspell:frontend
5+
npm run format
6+
npm run lint
7+
8+
# Run production consolidate script before commit
9+
.husky/scripts/consolidateForProd.sh
10+
11+
npm run build:backend

‎backend/.husky/pre-commit‎

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
[
2+
{
3+
"name": "BASH",
4+
"icon": "https://api.quicksnip.dev/icons/bash.svg",
5+
"subLanguages": []
6+
},
7+
{
8+
"name": "C",
9+
"icon": "https://api.quicksnip.dev/icons/c.svg",
10+
"subLanguages": []
11+
},
12+
{
13+
"name": "CPP",
14+
"icon": "https://api.quicksnip.dev/icons/cpp.svg",
15+
"subLanguages": []
16+
},
17+
{
18+
"name": "CSHARP",
19+
"icon": "https://api.quicksnip.dev/icons/csharp.svg",
20+
"subLanguages": []
21+
},
22+
{
23+
"name": "CSS",
24+
"icon": "https://api.quicksnip.dev/icons/css.svg",
25+
"subLanguages": []
26+
},
27+
{
28+
"name": "HASKELL",
29+
"icon": "https://api.quicksnip.dev/icons/haskell.svg",
30+
"subLanguages": []
31+
},
32+
{
33+
"name": "HTML",
34+
"icon": "https://api.quicksnip.dev/icons/html.svg",
35+
"subLanguages": []
36+
},
37+
{
38+
"name": "JAVA",
39+
"icon": "https://api.quicksnip.dev/icons/java.svg",
40+
"subLanguages": []
41+
},
42+
{
43+
"name": "JAVASCRIPT",
44+
"icon": "https://api.quicksnip.dev/icons/javascript.svg",
45+
"subLanguages": [
46+
{
47+
"name": "REACT",
48+
"icon": "https://api.quicksnip.dev/icons/javascript--react.svg"
49+
}
50+
]
51+
},
52+
{
53+
"name": "PYTHON",
54+
"icon": "https://api.quicksnip.dev/icons/python.svg",
55+
"subLanguages": [
56+
{
57+
"name": "FASTAPI",
58+
"icon": "https://api.quicksnip.dev/icons/python--fastapi.svg"
59+
},
60+
{
61+
"name": "TKINTER",
62+
"icon": "https://api.quicksnip.dev/icons/python--tkinter.svg"
63+
}
64+
]
65+
},
66+
{
67+
"name": "REGEX",
68+
"icon": "https://api.quicksnip.dev/icons/regex.svg",
69+
"subLanguages": []
70+
},
71+
{
72+
"name": "RUBY",
73+
"icon": "https://api.quicksnip.dev/icons/ruby.svg",
74+
"subLanguages": []
75+
},
76+
{
77+
"name": "RUST",
78+
"icon": "https://api.quicksnip.dev/icons/rust.svg",
79+
"subLanguages": []
80+
},
81+
{
82+
"name": "SCSS",
83+
"icon": "https://api.quicksnip.dev/icons/scss.svg",
84+
"subLanguages": []
85+
},
86+
{
87+
"name": "TYPESCRIPT",
88+
"icon": "https://api.quicksnip.dev/icons/typescript.svg",
89+
"subLanguages": []
90+
}
91+
]

‎backend/data/consolidated/bash.json‎

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[
2+
{
3+
"name": "System",
4+
"snippets": [
5+
{
6+
"title": "Kill Previous Instances",
7+
"description": "Kill all previous instances of a script",
8+
"author": "saminjay",
9+
"tags": [
10+
"kill",
11+
"process",
12+
"background"
13+
],
14+
"contributors": [],
15+
"code": "function kill_prev() {\n # $$ contains current pid (grep ignore so it doesn't suicide)\n local processes\n readarray -t processes < <(pgrep -f \"0ドル\" | grep -v \"$$\")\n kill \"${processes[@]}\" >/dev/null 2>&1\n}\n\n# Usage:\n# Add this function to your background running script\n# It will make sure that only one instance of your script is running at a time\nkill_prev\n",
16+
"extension": "bash"
17+
},
18+
{
19+
"title": "System Resource Monitor",
20+
"description": "Monitors system resources (CPU, RAM, disk, users)",
21+
"author": "sponkurtus2",
22+
"tags": [
23+
"file",
24+
"system"
25+
],
26+
"contributors": [],
27+
"code": "system_resources () {\n echo \"CPU Load: $(top -bn1 | grep \"Cpu(s)\" | awk '{print 2ドル}')%\"\n echo \"Memory Used: $(free -m | awk 'NR==2{printf \"%.2f%%\", 3ドル*100/2ドル}')\"\n echo \"Disk Used: $(df -h / | awk 'NR==2{print 5ドル}')\"\n echo \"Active Users: $(who | wc -l)\"\n}\n\nsystem_resources \"$@\"\n\n# Usage:\nchmod a+x system-resource-monitor.sh # First make it executable for all the users\n\n./system-resource-monitor.sh # It will print the following system resources (CPU, RAM, disk, and active users)\n",
28+
"extension": "bash"
29+
}
30+
]
31+
}
32+
]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /