Skip to content

Instantly share code, notes, and snippets.

💯
Basketball Belt + Binge Board + Cleaning Up Old Sites

Matt Jared mattjared

💯
Basketball Belt + Binge Board + Cleaning Up Old Sites
Block or report user

Report or block mattjared

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mattjared
mattjared / pre-commit
Created Jan 25, 2018
stylelint precommit hook to auto fix things that can be fixed
View pre-commit
if [[ "$STAGED_FILES_CSS" != "" ]]; then
echo -e "\nValidating Styles:\n"
# Loop through the staged stylesheets
for FILE in $STAGED_FILES_CSS
do
"$STYLELINT" "$FILE"
if [[ "$?" == 0 ]]; then
echo -e "\t\033[32mStyleLint Passed: $FILE\033[0m"
View starter.html
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation Practice</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/foundation/6.2.1/foundation.min.css">
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
@mattjared
mattjared / rename.py
Last active Mar 29, 2016
Rename Files in Python
View rename.py
import glob, os
def rename(dir, pattern, titlePattern):
for pathAndFileName in glob.iglob(pattern):
print pathAndFileName
os.rename(pathAndFileName, titlePattern % pathAndFileName)
rename(r'~/Path/to/directory', r'*.file-type', r'newName-%s')
View KoansRunner.html
<html>
<head>
<!--Scripts given to you with exercises and stuff.
// Write this in...-->
<script type="text/javascript">
function pageScroll() {
function runner() {window.scrollBy(0, 10000)};
window.setTimeout(runner, 2)
}
</script>
@mattjared
mattjared / index.html
Last active Dec 26, 2015
I have a map and when you click on an image corresponding with a location on the map I'd like for content hidden by a class with "display: hidden" to appear and change when I'm clicking on different locations in the map. I've got that working smoothly and you can click around freely on the different map locations and the corresponding informati…
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width"/>
<meta name=”Great Bean Chocolate” content=”A Higher State of Bean”/>
<title>Great Bean Chocolate | A Higher State of Bean</title>
<link rel="stylesheet" type="text/css" href="style.css">
<link href='http://fonts.googleapis.com/css?family=Andika' rel='stylesheet' type='text/css'>
<link href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
You can’t perform that action at this time.