Skip to content

Instantly share code, notes, and snippets.

@seanwalsh
seanwalsh / CLEANUP_README.md
Last active May 17, 2023 12:25
A shell script to delete a yarn.lock file and the node_modules directory.

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.

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.

## 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.
<li class="bookmark-value">
<a href="#">
<span class="visually-hidden">0 bookmarks</span>
<span aria-hidden="true">0</span>
</a>
</li>
@seanwalsh
seanwalsh / gist:f3db03cb1e3bd4cfce7e0b7bb220a09b
Created September 15, 2017 14:44
loop through sass map
@each $item in $map {
$key: nth($item, 1);
$value: nth($item, 2);
@if $value != FALSE {
#{$key}: $value; }
}
@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>
@seanwalsh
seanwalsh / info.md
Created September 19, 2016 13:28
Wordpress Migration to Google VM

To migrate a Wordpress site all we need is super-admin rights. We do not need FTP nor database access. The

Prepare Source Install

  • Deactivate all security plugins
    • make sure other plugins are up-to-date
  • make sure that wp-admin is accessible
  • install All-in-One WP Migration plugin
  • export site
  • note plugins
@seanwalsh
seanwalsh / rails.md
Last active November 10, 2016 15:14
Notes for Ruby on Rails

Rails Commands

rails g migration RemoveFieldFromTable field:type
rails g migration RenameBreedToBreedNameInCats

Rake Commands

rake db:setup
rake db:migrate
rake db:seed
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++) {