Skip to content

Instantly share code, notes, and snippets.

View SJROHRXD's full-sized avatar
🦆
ask me about the DOM

Sarah Jeanne Rohr SJROHRXD

🦆
ask me about the DOM
View GitHub Profile
@SJROHRXD
SJROHRXD / VSCTrix2.md
Last active April 19, 2023 05:20
💾 VS Code Trix - Bash Script (Windows) to Save Settings (Settings, Keybindings, Extensions List)

VS Code Trix - Bash Script (Windows) to Save Settings (Settings, Keybindings, Extensions List)

Path to the VS Code settings directory 📂

VSCODE_SETTINGS_DIR="$APPDATA/Code/User"

Create backup directory if it doesn't exist 🔍

BACKUP_DIR="$HOME/vscode_settings_backup"

if [ ! -d "$BACKUP_DIR" ]; then

@SJROHRXD
SJROHRXD / VSCTrix1.md
Last active April 19, 2023 05:03
🪀VS Code Trix - viewing extensions as a list + piping them to clipboard (Mac, Windows, GitBash)

VS Code Trix - viewing extensions as a list + piping them to clipboard (Mac, Windows, GitBash)

Command to view a list of extensions in VS Code:

Windows 🐚

  code --list-extensions

Mac 🧶

@Zo-Bro-23
Zo-Bro-23 / emojis.md
Last active February 23, 2023 11:53
Common emojis rendered in Apple/Google/Twitter/Microsoft/WhatsApp/Samsung styles 🧑🏽‍💻

🙂 Emojis

@luismts
luismts / GitCommitBestPractices.md
Last active July 23, 2024 01:05
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active June 14, 2024 22:42
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
@mindplace
mindplace / git_and_github_instructions.md
Last active July 22, 2024 04:38
Pushing your first project to github

1. Make sure git is tracking your project locally

Do you need a refresher on git? Go through Codecademy's git course.

  1. Using your terminal/command line, get inside the folder where your project files are kept: cd /path/to/my/codebase. → You cannot do this simply by opening the folder normally, you must do this with the command line/terminal.
    → Do you need a refresher on using your command line/terminal? I've compiled my favorite resources here.

  2. Check if git is already initialized: git status

@dmeents
dmeents / _ticket-control.js
Created August 9, 2016 02:18
How to create a React.js ticketing system using Redux-Form and a MongoDB
//server/controllers/_ticket-control.js
'use strict';
const Tickets = require('../models/tickets');
//===================
// Create Tickets Route
//===================
exports.createTicket = function(req, res, next) {
@scottpnelson
scottpnelson / README.md
Last active June 3, 2024 14:07
Automatic MySQL database setup from .env file contents

About

This script will automatically create a new MySQL database for you by reading your MySQL database name, host name, and user credentials from your .env file. This allows you to keep your database details safe, in a single location. Ideal for deployment and security.

Installation

1. Download setup_mysql.sh to your project root directory 2. You can modify setup_mysql.sh to set the following: - ENV_FILE (the relative path to your .env file -- e.g. ENV_FILE="./.env.local") - DEFAULT_MYSQL_HOST (the host name of your MySQL server -- e.g. "localhost") - DEFAULT_MYSQL_ADMIN_USERNAME (the administrator username of your mysql server -- e.g. "root" (note: this is typically NOT the MySQL username of your app). This should be no longer than 16 characters. Some versions of MySQL allow for longer lengths. You can modify the MAX_MYSQL_USERNAME_LENGTH variable to change this length. - DEFAULT_MYSQL_ADMIN_PASSWORD (the administrator password of your mysql admin user -- e.g