Skip to content

Commit 4aa4a46

Browse files
JanluOfficialACR1209
authored andcommitted
Merge of main
Fix cuz description was messed up Consolidate for the Prime Number Description Updated combinations.md Removing end of line prettier config as it's not needed anymore snippets: hex to rgb color snippets: rgb to hsl color snippets: hsl to rgb color refactor: optimized rgb to hsl color fix: hex to rgb color Added Sorting and Search Algorithms to C (quicksnip-dev#199) Update consolidated snippets Updating to use vite HMR to consolidate snippets Changing status check in plugin Snippets c++ (quicksnip-dev#103) * [C++] added snippet * [C++] added 3 snippets for string. * Added missing chrono header * fixed tags * fixed exemple needing std=c++20 * Fixed Usage to accommodate to new guidelines * Fixed all tags + type * Revert "Fixed all tags + type" This reverts commit aebefde. * Fixed type and all tags * fixed gh check failing * Update consolidated snippets * Update consolidated snippets * Update consolidated snippets * Revert "Merge remote-tracking branch 'origin/main' into snippets-c++" This reverts commit 4708bd9, reversing changes made to a959e95. * Update consolidated snippets --------- Co-authored-by: GitHub Action <action@github.com> java date-time formatting snippets added duration formatting removed language from tags enforced formatting requirements Renamed and improved python truncate snippet Renamed from `truncate-string.py` to `truncate.py` Replaced "..." with ellipses("…") to only use one character Implemented toggle for the `suffix` "…" on string with default of `True` Update reverse-string.md Added type hints Renamed `remove-specific-characters.md` to `remove-characters.md` Improved accuracy of Description for `convert-string-to-ascii` for better functional representation Renamed `convert-string-to-ascii.md` to `convert-string-to-unicode.md` Replaced ASCII with Unicode Kept `ascii` tag as it is a subset of unicode and to minimize search errors Fixed issue quicksnip-dev#192 Update CONTRIBUTING.md Added a `not` on line 68 in "Does that snippet have a real, and practical use case ?" to prevent useless snippets from being acceptable and useful snippets from being denied. Rectified loss of attribution recovered old attribution in the python snippet`truncate` to axorax and added the contributors tag. truncate.md reconformed to PEP 8 removed Tab Update truncate.md Replaced "…" with "..." Updated Description to match Update reverse-string.md followed change request Miner miner mods refactor 1 (quicksnip-dev#2) 2nd integration feat: update snippet button and modal increased the size of the snippet modal, added a bit more responsitivity too removed the gray filter on the snippet button feat: add minimum width to modal Added bash as a new language, also added a category and a snippet (quicksnip-dev#204) * Added a bash as a new language, also added a category and a snippet * Fixed the snippet to make it more like a snippet * Deleted public/consolidated/ and put code into a function * Deleted public/consolidated/ Update calculate-compound-interest.md Create Calculate-factorial.md Rename Calculate-factorial.md to calculate-factorial.md Update calculate-factorial.md Delete snippets/python/math-and-numbers/calculate-factorial.md refacto(css/pulse-animation): add 'alternate' and edit keyframes Added Rust category and a snippet [Snippet] [Fix] Added a bash snippet (quicksnip-dev#219) * removed bash icon * fix comments of a script * added kill_prev snippet * followed guidelines Remove language tag in guidelines math - remap function math - remap function to most languages remap to linearMapping, args renamed fix all mistakes,typos added array manipulation snippets removed unnecessary snippets
1 parent b5a2e94 commit 4aa4a46

File tree

89 files changed

+1285
-3460
lines changed

Some content is hidden

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

89 files changed

+1285
-3460
lines changed

.github/workflows/consolidate-snippets.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ dist-ssr
2323
*.njsproj
2424
*.sln
2525
*.sw?
26+
27+
# Consolidated snippets
28+
public/consolidated
29+
public/icons

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,5 @@
77
"bracketSpacing": true,
88
"bracketSameLine": false,
99
"arrowParens": "always",
10-
"endOfLine": "lf",
1110
"jsxSingleQuote": false
1211
}

CONTRIBUTING.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ If your function doesn't return anything just show how to use it. If the result
6565

6666
To ensure your snippet isn’t refused, consider these questions:
6767
- **Does the standard library of my language provide an easy way of doing this ?**
68-
- **Does that snippet have a real, and practical use case ?**
68+
- **Does that snippet not have a real, and practical use case ?**
6969
- **Could it be split into separate parts to be better understood ?**
7070

7171
If any answer is yes, then your snippet will most likely get rejected.
@@ -117,7 +117,7 @@ Here’s an example for JavaScript:
117117
title: Format Date
118118
description: Formats a date in 'YYYY-MM-DD' format.
119119
author: dostonnabotov
120-
tags: javascript,date,format
120+
tags: date,format
121121
---
122122

123123
```js
@@ -141,11 +141,11 @@ console.log(formatDate(new Date())); // Output: '2024-12-10'
141141
It will return nothing if they are well formatted, otherwise it will tell you what the error is.
142142
143143
---
144-
To preview the snippets, you need to consolidate them, use the `snippets:consolidate` script:
144+
To preview the snippets, start the vite server using:
145145
```
146-
$ npm run snippets:consolidate
146+
$ npm run dev
147147
```
148-
It will update the snippets in the `/public` folder, making them available to the frontend.
148+
It will use HMR to update the snippets in the `/public` folder, making them available to the frontend.
149149
150150
Expected file structure:
151151

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Here's an example for JavaScript:
6363
title: Format Date
6464
description: Formats a date in 'YYYY-MM-DD' format.
6565
author: dostonnabotov
66-
tags: javascript,date,format
66+
tags: date,format
6767
---
6868

6969
```js

package-lock.json

Lines changed: 16 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"snippets:consolidate": "node ./utils/consolidateSnippets.js"
1717
},
1818
"dependencies": {
19+
"@types/node": "^22.10.5",
1920
"motion": "^11.15.0",
2021
"prismjs": "^1.29.0",
2122
"react": "^18.3.1",

public/consolidated/_index.json

Lines changed: 0 additions & 82 deletions
This file was deleted.

public/consolidated/c.json

Lines changed: 0 additions & 45 deletions
This file was deleted.

public/consolidated/cpp.json

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)