Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

SG gholm

💭
I may be slow to respond.
View GitHub Profile
@gholm
gholm / GitHub-Forking.md
Created Aug 29, 2019 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow
View GitHub-Forking.md

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@gholm
gholm / LoanOrCredit-schema.json
Last active Aug 7, 2019
LoanOrCredit schema markup
View LoanOrCredit-schema.json
<script type='application/ld+json'>
{
"@context": "http://schema.org/",
"@type": "LoanOrCredit",
"amount": "300",
"loanTerm": {
"@type": "QuantitativeValue",
"maxValue": "1000",
"minValue": "300",
"unitText": "GBP",
View 403-error-page.markdown
@gholm
gholm / remove-yoast-noindex-for404.php
Last active Sep 19, 2018
Remove meta robots, like "noindex" and "nofollow" for the 404 template, from Yoast SEO
View remove-yoast-noindex-for404.php
/********* remove 'noindex' from 404 pages *********/
/* Based on this snippet:
* https://gist.github.com/amboutwe/0c71e42aa164238007d7ea88f174a93f#file-yoast_seo_robots_remove_search-php
*/
add_filter( 'wpseo_robots', 'yoast_seo_robots_remove_404' );
function yoast_seo_robots_remove_404( $robots ) {
if ( is_404() ) {
@gholm
gholm / cookies.html
Last active Apr 12, 2018
[Cookies] Silktide cookies notification #tools #3rdpscripts . Goes in the footer. More info: https://silktide.com/tools/cookie-consent/download/
View cookies.html
<!-- Begin Cookie Consent plugin by Silktide - http://silktide.com/cookieconsent -->
<script type="text/javascript">
window.cookieconsent_options = {"message":"This website uses cookies to ensure you get the best experience on our website","dismiss":"Got it!","learnMore":"More info","link":"https://yourwebsite.com/page","theme":"dark-top"};
</script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/1.0.10/cookieconsent.min.js"></script>
<!-- End Cookie Consent plugin -->
@gholm
gholm / basic-r.r
Last active Aug 9, 2018
[Basic R commands]
View basic-r.r
/* Basic commands
********************************* */
Ctrl+C or Esc key = quit current operation
q() = quit R
start.help() = show a html help page
getwd() = show the current working dir
You can’t perform that action at this time.