Skip to content

Instantly share code, notes, and snippets.

View garethredfern's full-sized avatar
🔥

Gareth garethredfern

🔥
View GitHub Profile
@garethredfern
garethredfern / global-gitignore.md
Created February 13, 2020 11:00 — forked from subfuzion/global-gitignore.md
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@garethredfern
garethredfern / AppServiceProvider.php
Created February 12, 2019 08:45 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@garethredfern
garethredfern / cheatsheet-raw
Last active August 29, 2015 14:05 — forked from centwave/cheatsheet-raw
Markdown cheatsheet.
# Header 1 #
## Header 2 ##
### Header 3 ### (Hashes on right are optional)
#### Header 4 ####
##### Header 5 #####
## Markdown plus h2 with a custom ID ## {#id-goes-here}
[Link back to H2](#id-goes-here)
This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one
/**
* FUNCTIONS
**/
/**
* Functions create closures; variables defined
* inside of them are accessible inside the
* function, and to any functions that were
* defined within the same scope.
**/
{{ if where }}
<div class="map" id="contact-map"></div>
<style scoped>
.map {height: 300px; width: 100%; max-width: 500px;}
</style>
<script type="text/javascript">
try{_location_maps.length;}catch(e){var _location_maps={};}
_location_maps["contact-map"] = {markers: [{'latitude': '{{ where:latitude }}','longitude':'{{ where:longitude }}','marker_content':'<h2>{{ where:name }}<\/h2>'}],clusters: true,spiderfy_on_max_zoom: true,show_coverage_on_hover: true,zoom_to_bounds_on_click: true,single_marker_mode: false,animate_adding_markers: true,disable_clustering_at_zoom: 15,max_cluster_radius: 80,starting_latitude: {{ where:latitude }},starting_longitude: {{ where:longitude }},starting_zoom: 15};
</script>
{{ location:start_maps }}

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@garethredfern
garethredfern / javascript.js
Created November 23, 2012 13:30 — forked from jamiepittock/ExpressionEngine template
Inject events from low_events:entries into low_events:calendar cells
$(".event").each(function() {
// get the ID of the event element
var the_date = $(this).attr("id");
// find the tabel cell with that same ID and append the div
$(this).clone().appendTo('.calendar td#' + the_date);
});