Skip to content

Instantly share code, notes, and snippets.

View samyerkes's full-sized avatar
🤙

Sam samyerkes

🤙
View GitHub Profile
@un33k
un33k / sed cheatsheet
Created August 22, 2011 13:28
magic of sed -- find and replace "text" in a string or a file
FILE SPACING:
# 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'
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@malarkey
malarkey / Three Wise Monkeys.md
Created December 2, 2012 14:26
Three Wise Monkeys (NDA)

Date: [date]

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

Summary:

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

What’s confidential information?

@jesselcampbell
jesselcampbell / html-elements.html
Last active November 4, 2022 19:44
HTML Elements
<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>
<hr>
<h1>Heading 1</h1>
<h2>Heading 2</h2>
<h3>Heading 3</h3>
<h4>Heading 4</h4>
@fhferreira
fhferreira / CORS.php
Last active April 30, 2023 16:49
Try to create - Cors Filter Laravel 5 Middleware
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Routing\Middleware;
use Illuminate\Http\Response;
class CORS implements Middleware {
/**
* Handle an incoming request.
#!/usr/bin/env bash
usage="Usage: $(basename "$0") region stack-name [aws-cli-opts]
where:
region - the AWS region
stack-name - the stack name
aws-cli-opts - extra options passed directly to create-stack/update-stack
"
@keesiemeijer
keesiemeijer / wp-update
Last active November 17, 2023 07:08
A bash script to update everything WordPress (core, plugins, themes and comments).
#!/usr/bin/env bash
# =============================================================================
#
# *** WARNING: THIS SCRIPT IS NO LONGER MAINTAINED ***
#
# use https://github.com/keesiemeijer/wp-update instead
#
# =============================================================================
@simonhamp
simonhamp / AppServiceProvider.php
Last active March 26, 2024 15:56
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()
@purp
purp / README.md
Created December 15, 2018 21:46
Convert exported Apple contacts .vcf to CSV

I have a bunch of folks I want to export from Apple Contacts on MacOS and turn into a spreadsheet for a holiday card mail merge.

This is my clumsy way of doing it.

@mendeza
mendeza / vim-sort-regex.md
Last active October 4, 2022 11:36
Vim Sort with RegEx

Vim Sort with RegEx

Vim Manual

See :help :sort.

:[range]sor[t][!] [b][f][i][n][o][r][u][x] [/{pattern}/]