Skip to content

Instantly share code, notes, and snippets.

View dannyvassallo's full-sized avatar

Dan Vassallo dannyvassallo

View GitHub Profile
@jherax
jherax / configure.md
Last active July 3, 2025 12:33
VS Code: Debugging with Jest

VS Code: Debugging Jest

Sometimes, debugging with console.log is not enough to find out what is happening in the code, as console.log prints only plain objects but neither functions nor objects with circular references. Besides, it's possible you may need to know the context and flow of the code.

Read more about debugging with VS Code in VS Code: Debugging.

@seeliang
seeliang / lint-only-changed-files.MD
Last active December 2, 2024 05:08
How to lint only changed files?

find out the differences

use git diff to generate file list

git diff --name-only master

limited to certain file types

add ext filter

@adipasquale
adipasquale / rails-tests.yml
Last active March 5, 2021 16:10
GitHub Action for CI Rails Tests with a specific ruby version, minitest, Chrome Headless and PostgreSQL
# .github/workflows/rails-tests.yml
name: Rails Tests
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
PGHOST: localhost
PGUSER: postgres
RAILS_ENV: test
@bouzou4
bouzou4 / directory-print
Last active February 18, 2025 21:48
Concatenates the contents of specified file types into a single file, with headers indicating the source files.
#!/bin/zsh
# Help message function
function show_help() {
cat <<- EOF
Usage: ${0} [OPTIONS] -e EXTENSIONS
Concatenates the contents of specified file types into a single file, with headers indicating the source files.
OPTIONS:
-d Directory to start looking for files (default is current directory)
-e Extensions to include, comma-separated. Example: js,jsx,ts