Skip to content

Instantly share code, notes, and snippets.

View mattgoucher's full-sized avatar
🏠
Working from home

Matt Goucher mattgoucher

🏠
Working from home
View GitHub Profile
@salcode
salcode / .gitignore
Last active February 10, 2024 10:56
See https://salferrarello.com/wordpress-gitignore/ for the latest version of my WordPress .gitignore file
# -----------------------------------------------------------------
# .gitignore for WordPress
# Bare Minimum Git
# http://ironco.de/bare-minimum-git/
# ver 20150227
#
# This file is tailored for a WordPress project
# using the default directory structure
#
# This file specifies intentionally untracked files to ignore
@facultymatt
facultymatt / roles_invesitgation.md
Last active April 16, 2024 09:31
Roles and permissions system for Nodejs
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@jakebellacera
jakebellacera / http-auth-basic.md
Created January 9, 2012 21:18
How to secure a folder with Basic HTTP Authentication

Basic HTTP Authentication is when a user is required to log in to access a directory. This isn't meant to be secure by any means, but it's useful for locking out a majority of users from accessing a folder (e.g. staging a website).

To start, you must add this into your .htaccess:

AuthUserFile "/var/www/full/path/to/your/folder/.htpasswd"
AuthName "Message to go on user's login screen"
AuthType Basic
Allow from all
Require valid-user

Options +Indexes

@jakebellacera
jakebellacera / css-sections.css
Created May 26, 2011 17:21
A model for CSS comments/sections (great for find & replace!)
/**
* Section Declaration
* ===================
* This is an optional description of the section.
* You might want to talk about what's going on in
* here, or maybe you don't need one at all.
*/
/* Child section -- something relevant to the parent section */
@banksean
banksean / perlin-noise-classical.js
Created February 15, 2010 10:00
two Perlin noise generators in javascript. The simplex version is about 10% faster (in Chrome at least, haven't tried other browsers)
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/