Skip to content

Instantly share code, notes, and snippets.

View toddmcbrearty's full-sized avatar

Todd toddmcbrearty

  • Eppers-Bean
  • USA
View GitHub Profile
@toddmcbrearty
toddmcbrearty / kill port.txt
Last active February 12, 2018 03:39
kill process using port osx
lsof -ti:<port_number> | xargs kill -9
@toddmcbrearty
toddmcbrearty / url.js
Last active October 27, 2020 21:37
Easily Handle URLSearchParams
/**
* Handles UrL SearchParams
* @param search [search=window.location.href]
* @param key [key=|key=string|key=array]
* @param raw [raw=false]
* @returns {string|object|URLSearchParams}
*/
export const getUrlSearchParams = (
search = window.location.search,
key,
@toddmcbrearty
toddmcbrearty / Javascript States Object
Created September 13, 2021 14:30
States Array #javascript
const states = {
AL => 'Alabama',
AK => 'Alaska',
AS => 'American Samoa',
AZ => 'Arizona',
AR => 'Arkansas',
CA => 'California',
CO => 'Colorado',
CT => 'Connecticut',
DE => 'Delaware',
@toddmcbrearty
toddmcbrearty / pstorm.sh
Last active September 26, 2022 16:18
Open phpstorm projects
#!/bin/bash
green_text () {
nc='\033[0m' # No Color
green='\033[0;32m' # Green
echo -e "${green}$1${nc}"
}
red_text () {
nc='\033[0m' # No Color