Skip to content

Instantly share code, notes, and snippets.


Matt Jared mattjared

View GitHub Profile
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
if [[ "$?" == 0 ]]; then
echo -e "\t\033[32mStyleLint Passed: $FILE\033[0m"
View starter.html
<!DOCTYPE html>
<html class="no-js" lang="en">
<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="">
<link rel="stylesheet" type="text/css" href="styles.css">
mattjared /
Last active Mar 29, 2016
Rename Files in Python
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
<!--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)
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>
<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='' rel='stylesheet' type='text/css'>
<link href="" rel="stylesheet">
You can’t perform that action at this time.