Skip to content

Instantly share code, notes, and snippets.

View shrop's full-sized avatar
👋

Mark Shropshire shrop

👋
View GitHub Profile
@shrop
shrop / usb.sh
Last active December 12, 2023 08:04
USB Gadget Raspberry Pi
#!/bin/bash
cd /sys/kernel/config/usb_gadget/
mkdir -p pi4
cd pi4
echo 0x1d6b > idVendor # Linux Foundation
echo 0x0104 > idProduct # Multifunction Composite Gadget
echo 0x0100 > bcdDevice # v1.0.0
echo 0x0200 > bcdUSB # USB2
echo 0xEF > bDeviceClass
echo 0x02 > bDeviceSubClass
@shrop
shrop / brewStack.md
Last active October 11, 2023 20:18
brewStack Docs
black = '#282828';
red = '#cc241d'; // red
green = '#98971a'; // green
yellow = '#d79921'; // yellow
blue = '#458588'; // blue
magenta = '#b16286'; // pink
cyan = '#689d6a'; // cyan
white = '#a89984'; // light gray
lightBlack = '#928374'; // medium gray
lightRed = '#fb4934'; // red
@shrop
shrop / gist:5995086
Last active November 17, 2022 08:07
Improved script for highlighting git repo folders which have unstated/uncommitted files. An improvement on the script for the Hazel rule created by @tylerhall: http://clickontyler.com/blog/2013/03/hazel-and-git. This improvement checks to see if the folder is actually a git repo and if not, doesn't bother processing any further.
dirname=$1
if [ -f $dirname ]; then
dirname=`dirname $dirname`
fi
cd $dirname
if [ ! -d .git ]; then
exit 1
fi
@shrop
shrop / Use drush to disable all non-core modules.sh
Created December 8, 2011 19:25
Use drush to disable all non-core modules
drush pml --no-core --type=module --status=enabled --pipe | xargs drush -y dis
@shrop
shrop / intro-meteor.js.md
Last active October 1, 2022 16:54
Introduction to Meteor.js
@shrop
shrop / curl-loop.sh
Created March 31, 2017 14:12
Script to loop through a text file list of URLs and output the curl -I to a text file
#!/bin/bash
for i in $(cat urls.txt); do
content=$(curl -I -s "{$i}")
echo "URL: $i" >> output.txt
echo "$content" >> output.txt
done
import React, { Component } from 'react';
import {
Box,
Button,
Collapsible,
Grommet,
Heading,
Image,
Layer,
ResponsiveContext,