This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # npm-supply-chain.sh | |
| # Check for and harden against the 2026 Axios and Mini Shai-Hulud npm supply chain attacks. | |
| # Usage: ./npm-supply-chain.sh <check|harden> | |
| set -eo pipefail | |
| BOLD="\033[1m" | |
| RED="\033[31m" | |
| GREEN="\033[32m" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func calcSize<T: View>(views: [T], fitting: CGSize) -> CGSize { | |
| let stack = HStack(spacing: 0) { | |
| ForEach(views.indices) {r in views[r]} | |
| } | |
| let renderer = UIHostingController(rootView: stack) | |
| return renderer.sizeThatFits(in: fitting) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # | |
| # Iconizer shell script by Steve Richey (srichey@floatlearning.com) | |
| # Modified by Rich Ellis (rich@richellis.net) based on contributions on Github from crishoj, giria | |
| # https://gist.github.com/steverichey/8493f3bd31ae71a9c933/forks | |
| # | |
| # This is a simple tool to generate all necessary app icon sizes and the JSON file for an *EXISTING* Xcode project from one file. | |
| # To use: specify the path to your vector graphic (PDF format) and the path to your Xcode folder containing Assets.xcassets | |
| # Example: sh iconizer.sh MyVectorGraphic.pdf MyXcodeProject |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Z=A+B−AB. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| execute pathogen#infect() | |
| syntax on | |
| filetype plugin indent on | |
| set backspace=indent,eol,start | |
| set laststatus=2 | |
| let g:airline_theme='solarized' | |
| let g:ycm_global_ycm_extra_conf='~/.vim/bundle/YouCompleteMe/c/ycm_extra_conf.py' | |
| set nu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ps -eo pmem,pcpu,vsize,pid,command | sort -k 1 -nr | head -5 |