Skip to content

Instantly share code, notes, and snippets.

View seanwalsh's full-sized avatar

Sean Walsh seanwalsh

View GitHub Profile
@seanwalsh
seanwalsh / CLEANUP_README.md
Last active May 13, 2024 00:05
A shell script to delete a yarn.lock file and the node_modules directory.

Node Modules Cleanup

This script should be run from the directory containing the node_modules directory and yarn.lock file you want to delete. Be careful with this script as it will delete these items without asking for confirmation. If you want a confirmation prompt before deletion, you can modify the rm commands to rm -i to ask for confirmation before each deletion.

Here's how to use the script:

  1. Save the script to a file, for example cleanup.sh.
  2. Make the script executable by running chmod +x cleanup.sh in your terminal.
  3. Run the script using ./cleanup.sh in your terminal.

Package.json

## Sources
**User Flow**:
**Data Source(s)**:
**Path**:
**Comp Desktop**:
**Comp Mobile**:
## Content
A list of content, where to get the content or description of when the content will be available.
@seanwalsh
seanwalsh / example.html
Created July 1, 2017 22:56
Example of a good anchor link text
<a href="#">download <i>War & Peace</i></a>
RewriteEngine On
# REWRITE FROM WWW.EXAMPLE.COM TO EXAMPLE.COM
RewriteCond %{HTTP_HOST} ^www.example.com$ [NC]
RewriteRule ^(.*)$ http://example.com/$1 [R=301,L]
# REDIRECT HOMEPAGE TO /THIS-WEEK/ UNTIL HOMEPAGE IS CREATED
Redirect /index.php http://example.com/this-week/
#REWRITE ITEM/? TO THE INDEX FILE
@seanwalsh
seanwalsh / ToggleBoolean ( field )
Created January 10, 2016 15:35
FileMaker custom function.
Case ( field = 1; 0; 1 )
@seanwalsh
seanwalsh / code.md
Last active December 30, 2015 00:08

JavaScript

for (i=0; i < n; i++) {
 // code
}

PHP

for ($i = 0; $i &lt; $n; $i++) {
Right ( GetFieldName ( Self ) ; Length ( GetFieldName ( Self ) ) - Position ( GetFieldName ( Self ) ; ":" ; 1 ; 2 ) )
@seanwalsh
seanwalsh / phone-format
Last active September 3, 2015 14:41
Based off of https://www.briandunning.com/cf/391. Added comments to help a developer understand recursive functions.
Let(
[
NumbersOnly = Filter ( Phone; "0123456789" ); // make sure we are only dealing with numerals
NewNumber = Right ( NumbersOnly; Length ( NumbersOnly ) - 1 ); // trim the string by 1 for the next recursive call
NewFormat = Right ( Format; Length ( Format ) - 1 ) // trim the string by 1 for the next recursive call
];
Case (
Custom Function
PassScriptParameter ( Value )
Parameter
Value
Definition
Let ( [
xWord = "|" & Value & "|"; /* WHAT IS THE FILTER TERM WE ARE LOOKING FOR */
xCount = Length ( xWord ); /* COUNT THE LENGTH OF THE FILTER TERM */
@seanwalsh
seanwalsh / formatFilePath.txt
Created December 29, 2014 00:44
FileMaker custom function to create a file path.
/*
---------------------------------------------------------------
CUSTOM FUNCTION :: formatFilePath ( format )
---------------------------------------------------------------
formatFilePath © 2006 Sean Walsh
Developed by: Sean Walsh
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: