Skip to content

Instantly share code, notes, and snippets.

Working from home

Sam samyerkes

Working from home
View GitHub Profile
simonhamp / AppServiceProvider.php
Last active Sep 21, 2022
A pageable Collection implementation for Laravel
View AppServiceProvider.php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
public function boot()
keesiemeijer / wp-update
Last active Sep 21, 2021
A bash script to update everything WordPress (core, plugins, themes and comments).
View wp-update
#!/usr/bin/env bash
# =============================================================================
# use instead
# =============================================================================
#!/usr/bin/env bash
usage="Usage: $(basename "$0") region stack-name [aws-cli-opts]
region - the AWS region
stack-name - the stack name
aws-cli-opts - extra options passed directly to create-stack/update-stack
fhferreira / CORS.php
Last active Oct 16, 2019
Try to create - Cors Filter Laravel 5 Middleware
View CORS.php
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Http\Response;
class CORS implements Middleware {
* Handle an incoming request.
View html-elements.html
<h1>Basic Elements</h1>
<p>The purpose of this page is to help determine the default styling of all possible HTML elements so nothing is overlooked in our final product.</p>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
View Three Wise

Date: [date]

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


In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

lucasfais / gist:1207002
Created Sep 9, 2011
Sublime Text 2 - Useful Shortcuts
View gist:1207002

Sublime Text 2 – Useful Shortcuts (Mac OS X)


⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
un33k / sed cheatsheet
Created Aug 22, 2011
magic of sed -- find and replace "text" in a string or a file
View sed cheatsheet
# double space a file
sed G
# double space a file which already has blank lines in it. Output file
# should contain no more than one blank line between lines of text.
sed '/^$/d;G'