Skip to content

Instantly share code, notes, and snippets.

View u01jmg3's full-sized avatar
🔷
Coding Hard

Jonathan Goode u01jmg3

🔷
Coding Hard
View GitHub Profile
@digitaljhelms
digitaljhelms / gist:4287848
Last active March 28, 2024 04:59
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
@ScottPhillips
ScottPhillips / .htaccess
Created February 2, 2012 04:30
Common .htaccess Redirects
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php http://www.domain.com/pagename.html
#Redirect an entire site:
Redirect 301 / http://www.domain.com/
#Redirect an entire site to a sub folder
Redirect 301 / http://www.domain.com/subfolder/
@joecampo
joecampo / fail2ban.md
Last active March 26, 2024 15:36
fail2ban – stop HTTP(S) route abuse/brute forcing

If you're not familiar: What is fail2ban? fail2ban is an awesome linux service/monitor that scans log files (e.g. auth.log for SSH) for potentially malicious behavior. Once fail2ban is tripped it will ban users for a specified duration by adding rules to Iptables. If you're unfamiliar with fail2ban Chris Fidao has a wonderful (& free!) series about security including setting up fail2ban here.

Recently Laravel released a new feature in 5.1 to throttle authentication attempts by simply adding a trait to your authentication controller. The Laravel throttle trait uses the inputted username, and IP address to throttle attempts. I love seeing this added to a framework out of the box, but what about some of our other apps not built on Laravel? Like a WordPress login? Or even an open API etc.? Ultimately,

@egmontkob
egmontkob / Hyperlinks_in_Terminal_Emulators.md
Last active March 26, 2024 01:51
Hyperlinks in Terminal Emulators
@staltz
staltz / introrx.md
Last active March 26, 2024 00:52
The introduction to Reactive Programming you've been missing
@piscisaureus
piscisaureus / pr.md
Created August 13, 2012 16:12
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@PurpleBooth
PurpleBooth / README-Template.md
Last active March 24, 2024 02:11
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@xuanlongma
xuanlongma / pandoc_multi_input.md
Last active March 22, 2024 21:49
Combine multiple input files when using Pandoc

If multiple input files are given, pandoc will concatenate them all (with blank lines between them) before parsing. -- from Pandoc website

Pandoc command: pandoc -s input1.md input2.md input3.md -o output.html

@malarkey
malarkey / Contract Killer 3.md
Last active March 22, 2024 18:37
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@paulirish
paulirish / rAF.js
Last active March 22, 2024 00:00
requestAnimationFrame polyfill
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];