Snippets Collection
This collection includes various snippets for CSS, HTML, and Python to streamline development tasks. Below is a detailed list of all available snippets:
CSS Snippets
CSS Flexbox
- Prefix:
cf-cssFlexbox
- Description: A simple flexbox container for layout.
CSS Grid
- Prefix:
cg-cssGrid
- Description: A basic CSS grid layout structure.
- Prefix:
cm-cssMediaQuery
- Description: A responsive design media query.
- Prefix:
cb-cssButton
- Description: A simple button style.
CSS Structure
- Prefix:
cs-cssStructure
- Description: Basic structure for a CSS file with comments and sections.
CSS Reset
- Prefix:
cr-cssReset
- Description: A comprehensive CSS reset to normalize styles across browsers.
CSS Animation Keyframes
- Prefix:
ca-cssAnimation
- Description: Create a simple CSS animation with keyframes.
CSS Pseudo-Elements
- Prefix:
cp-cssPseudoElements
- Description: Add pseudo-elements for additional design elements.
CSS Variables
- Prefix:
cv-cssVariables
- Description: Define and use CSS custom properties (variables).
HTML Snippets
HTML Navbar
- Prefix:
hn-htmlNavbar
- Description: Creates a simple navigation bar.
HTML Table
- Prefix:
htt-htmlTable
- Description: Creates a basic HTML table.
HTML Dropdown List
- Prefix:
hdd-htmlDropdown
- Description: Creates a dropdown list with three options.
- Prefix:
hrb-htmlRadioGroup
- Description: Creates a group of radio buttons.
HTML Checkbox Group
- Prefix:
hc-htmlCheckboxGroup
- Description: Creates a group of checkboxes.
- Prefix:
hb-htmlButton
- Description: Inserts a button element.
- Prefix:
hf-htmlForm
- Description: Creates a simple form with input fields.
HTML Video
- Prefix:
hv-htmlVideo
- Description: Inserts a video element with a source.
HTML Audio
- Prefix:
ha-htmlAudio
- Description: Inserts an audio element with a source.
HTML Card
- Prefix:
hca-htmlCard
- Description: Creates a card structure with an image and content.
Python Snippets
Property Getter & Setter
- Prefix:
pp-property_&_setter
- Description: Property with editable name, type, and error message.
Read JSON Function
- Prefix:
prj-read_json
- Description: Reads a JSON file and returns the parsed content, with error handling for file not found and invalid JSON.
Read TXT Into List
- Prefix:
prt-read_txt_to_list
- Description: Reads a text file and returns a list of lines, with error handling using 'with' for automatic file handling.
Read CSV To List
- Prefix:
prc-read_csv_to_list
- Description: Reads a CSV file and returns a list of concatenated parts from each line with error handling.
- Prefix:
pwt-write_txt
- Description: Writes the input passed as a parameter to a file and handles possible errors like permission issues or file not found.
Create Class
- Prefix:
pcc-create_class
- Description: A class template.
Create Service Template
- Prefix:
pcs-create_service
- Description: Create a template for a service class.
MySQL Config
- Prefix:
pmc-mysql_config
- Description: Configuration for MySQL and application.
MySQLDB Operations
- Prefix:
pmo-mysqldb_operations
- Description: A class for managing MySQL database operations including connection management, executing queries for reading data, and performing CRUD operations with error handling and transaction support.
Usage
Creative Commons Attribution-NoDerivatives 4.0 International License (CC BY-ND 4.0)
This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License.
Permissions:
- You may use and share this work as is.
- Attribution to the author is required.
Restrictions:
- You may not modify or create derivative works based on this material.
- You may not distribute modified versions of this work.
THE WORK IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF, OR IN CONNECTION WITH THE WORK OR THE USE OR OTHER DEALINGS IN THE WORK.