Skip to content

Instantly share code, notes, and snippets.

View mattjared's full-sized avatar
💯

Matt Jared mattjared

💯
View GitHub Profile
@mattjared
mattjared / index.html
Last active December 26, 2015 08:29
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…
<!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">
@mattjared
mattjared / rename.py
Last active March 29, 2016 18:59
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')
<!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 / pre-commit
Created January 25, 2018 21:06
stylelint precommit hook to auto fix things that can be fixed
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"
<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>