Skip to content

Instantly share code, notes, and snippets.

View jamesnotjim's full-sized avatar

James Martin jamesnotjim

View GitHub Profile
@jamesnotjim
jamesnotjim / hideInlineBlogByline.css
Created April 18, 2017 20:30
Hides the byline and dateline on O365/SharePoint Online Blogs that use the Inline post layout
<style type="text/css">
.ms-metadata.ms-textSmall span {
visibility: hidden;
}
</style>
@jamesnotjim
jamesnotjim / hideByLine.css
Last active April 18, 2017 20:38
Hide the by-line on SharePoint blog sites
<style type="text/css">
/* Hide by-line author and time */
ul li div div span span .ms-subtleLink {
visibility: hidden;
display: none;
}
/* Uncomment to Hide entire by-line
ul li .ms-textSmall span {
visibility: hidden;
display: none;
@jamesnotjim
jamesnotjim / JSredirect.html
Created September 6, 2017 20:36
A pure JS redirect with configurable URL and delay.
<script type="text/javascript">
// delay, in milliseconds
var delay = 6000;
var URL = "https://example.com";
document.write("<h1>This page has moved. You will be redirected in " + delay/1000 + " seconds. If you are not redirected, please <a href=" + URL + ">follow this link</a>.</h1>");
setTimeout(function(){ window.location = URL; }, delay);
</script>
@jamesnotjim
jamesnotjim / fizzbuzz.js
Created September 20, 2017 13:54
JS FizzBuzz
for (number = 1; number <= 100; number++) {
if (number % 3 == 0 && number % 5 == 0) {
console.log ("FizzBuzz");
} else if (number % 3 == 0) {
console.log ("Fizz");
} else if (number % 5 == 0) {
console.log ("Buzz");
} else {
console.log(number);
}
@jamesnotjim
jamesnotjim / echo.php
Last active October 6, 2017 17:32
A PHP 'Hello World!' as well as a useful PHP/Bootstrap/jQuery skeleton
<!DOCTYPE html>
<html>
<head>
<!-- Include Bootstrap and jQuery -->
<link rel="stylesheet" type="text/css" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
@jamesnotjim
jamesnotjim / fontAwesomeSmiley.html
Last active December 15, 2017 20:52
Adding a Smiley Face via Font Awesome
<i class="fa fa-smile-o"></i>
@jamesnotjim
jamesnotjim / fourDigitYearjQueryGeneric.html
Created April 20, 2018 21:06
Dynamic Copyright Date Example
<!-- include these in the head -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
var copyrightYear = (new Date()).getFullYear();
var copyrightVerbiage = "Tyrell Corporation. Trademarks and registered trademarks are owned by Tyrell Corporation or its subsidiaries.";
element = document.getElementById("Copyright");
element.innerHTML = "&copy;" + copyrightYear + " " + copyrightVerbiage;
});
@jamesnotjim
jamesnotjim / reactBasicTemplate.html
Last active June 22, 2018 18:49
A basic template for React experimentation
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>React Template</title>
<script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script>
<style>
</style>
@jamesnotjim
jamesnotjim / countdown-redirect.html
Created July 9, 2018 15:40 — forked from Joel-James/countdown-redirect.html
Count Down Redirect Uisng JavaScript
<!-- Modify this according to your requirement -->
<h3>
Redirecting to duckdev.com after <span id="countdown">10</span> seconds
</h3>
<!-- JavaScript part -->
<script type="text/javascript">
// Total seconds to wait
var seconds = 10;
@jamesnotjim
jamesnotjim / BTPeopleHideINT.html
Created July 10, 2018 21:40
BindTuning People Web Part (style mod)
<style type="text/css">
.bt-persona-account-type {
visibility: hidden;
}
</style>