Skip to content

Instantly share code, notes, and snippets.

Avatar
🔥
#BLM

Dan Levy justsml

🔥
#BLM
View GitHub Profile
@justsml
justsml / settings.json
Created Jun 21, 2022
VS Code Recommended Settings
View settings.json
{
// TypeScript configuration
// Use the project-local typescript version / may be desired, comment out on old TS versions
"typescript.tsdk": "node_modules/typescript/lib",
"typescript.preferences.importModuleSpecifier": "relative",
// Terminal settings
"terminal.integrated.scrollback": 100000, // Terminal scrollback line limit
// Set terminal font size to match VS Code font size. See: https://www.NerdFonts.com/
"terminal.integrated.fontFamily": "'MesloLGS NF', 'Hack Nerd Font', Menlo, Monaco, 'Courier New', monospace",
View Open-Source-Security-Tooling.md

Security Tooling

The following scanning tools offer significant security benefits over basic Dependabot NPM scanning & external scanning services (e.g. Nessus).

Dependency Scanning

OpenSSF/Package Analysis

Read the Package Analysis announcement.

@justsml
justsml / RectangleConfig.json
Last active May 19, 2022
Rectangle: customized config for ⭐️ Mac window layout utility.
View RectangleConfig.json
{
"bundleId" : "com.knollsoft.Rectangle",
"defaults" : {
"allowAnyShortcut" : {
"bool" : false
},
"almostMaximizeHeight" : {
"float" : 0
},
"almostMaximizeWidth" : {
View getFileAndDirname.js
import path from "path";
import { fileURLToPath } from "url";
/**
* Usage:
* const { __dirname, __filename } = getFileAndDirname(import.meta.url);
*/
export default function getFileAndDirname(importMetaUrl) {
const __filename = fileURLToPath(importMetaUrl);
const __dirname = path.dirname(__filename);
@justsml
justsml / terminal-ui-libraries.md
Last active Nov 19, 2021
Beautiful Terminal Apps with Nodejs
View terminal-ui-libraries.md
@justsml
justsml / project-ideas.md
Last active Oct 14, 2021
Project ideas for learning a language, framework or library.
View project-ideas.md

Project Ideas

Project ideas for learning a language, framework or library.

UI Components

  • Autocomplete
    • Use local/static JSON data.
    • Use a popular public API (Star Wars API, Pokemon API, GitHub API, etc.)
  • Notes:
View hammerspoon-init.lua
-- credit: https://spinscale.de/posts/2016-11-08-creating-a-productive-osx-environment-hammerspoon.html
--[[ function factory that takes the multipliers of screen width
and height to produce the window's x pos, y pos, width, and height ]]
function baseMove(x, y, w, h)
return function()
local win = hs.window.focusedWindow()
local f = win:frame()
local screen = win:screen()
local max = screen:frame()
@justsml
justsml / increase-maxfiles.sh
Last active Sep 10, 2021
Fix Open files limit on MacOS OSX 11.4
View increase-maxfiles.sh
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
sudo cat << HEREDOC > /Library/LaunchDaemons/limit.maxfiles.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
View macos-setup.md

MacOS - Software Developer Environment Setup

Dan's collection of MacOS setup and configuration scripts, updated for 2022 🚀!

Table of Contents

Software & Apps

@justsml
justsml / config-overrides.js
Created Mar 15, 2021
Reference for 'Rewiring' Create-React-Apps without their rude defaults.
View config-overrides.js
// Follow setup instructions https://github.com/timarney/react-app-rewired
// Example config:
const path = require('path');
const { alias, configPaths } = require('react-app-rewire-alias');
const addRewireScssLoader = require('react-app-rewire-scss-loaders');
const rewireWebpackBundleAnalyzer = require('react-app-rewire-webpack-bundle-analyzer');
module.exports = function override(config, env) {
// Fucking CRApps feel entitled to overwrite tsconfig.json...
alias(configPaths('./tsconfig.paths.json'))(config);