Skip to content

Instantly share code, notes, and snippets.

View murtaugh's full-sized avatar

Tim Murtaugh murtaugh

View GitHub Profile
compermisos / strong-passwords.php
Last active December 12, 2023 15:34 — forked from tylerhall/strong-passwords.php
A user friendly, strong password generator PHP function.
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
jed /
Last active August 29, 2015 14:16


tl;dr: The [UNIQLO USA][] e-commerce team is looking for a design-oriented developer skilled in the arts of modern markup and style, but also comfortable with some PHP and JavaScript.

In this position, you will:

  • Create end-to-end responsive mockups of UNIQLO landing pages for upcoming product lines.
  • Work in-house with the visuals team to design experiences and assets that scale well across device sizes.
pauloelias / ExpressionEngine "Edit This" Link
Last active December 28, 2017 17:49
ExpressionEngine "Edit Entry" link. Place this in your channel entries output to provide a direct link to edit the entry in the control panel.
litzinger /
Last active January 26, 2023 20:28
How to show errors when you get a white screen in EE. Turning up the debugging will reveal PHP errors.


Below are two techniques to help debug the WSOD (white screen of death), usually a 500 server error, in an ExpressionEngine site. The Basic-Debugging option will be suitable in most cases and is specific to ExpressionEngine. The Advanced-Debugging is generic and applicable to any PHP based software. If the basic debugging does not work, try the advanced.

If you get a WSOD you will need to first get your site to reveal an error before reporting it to EllisLab or the add-on developer. Simply reporting "I get a white screen" does not give the developer enough information to assist you. An error message on the other hand will point the developer to the source of the issue.

litzinger / gist:3360372
Created August 15, 2012 13:57
server name as global variable
Add this to your config.php file
$default_global_vars = array(
'global:domain_name' => $_SERVER['SERVER_NAME']
// Make this global, then add our default_global_vars to the config variables here
global $assign_to_config;
joshellington /
Created March 28, 2012 07:07
Basic tutorial for creating a SFTP-only user on Ubuntu 9.04 and greater

Adding SFTP-only user to Ubuntu Server

To add a SFTP-only user, you'll need to make sure your SSH config settings are correct, add a new user/group and set permissions for your new user. For step-by-step directions, see below. Omit sudo if you're logged in as root.


  1. Edit /etc/ssh/sshd_config and make sure to add the following at the end of the file:

     Match group filetransfer

ChrootDirectory %h

josue /
Created March 27, 2012 03:53
Hide or show the MAMP Pro dock icon.
# Place this script in dir: /usr/bin
# Change permissions: sudo chmod +x /usr/bin/MAMP-DOCK-INVISIBLE
# Ensure the MAMP 'Info.plist' file has the following entry:
# <key>LSUIElement</key>
# <string dock-visible="1">NO</string>
# Usage:
jlong / jquery.autogrow.js
Last active February 27, 2020 08:39
Autogrow Textareas in jQuery
* jquery.autogrow.js
* A plugin written for UserVoice that makes it easy to create textareas
* that automatically resize to fit their contents.
* Based on Scott Moonen's original code for Prototype.js:
* <>
paulirish / data-markdown.user.js
Last active February 6, 2024 10:41
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <>
// @link
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
ocean90 / box-shadow.html
Last active April 11, 2024 13:54
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<title>Box Shadow</title>
.box {
height: 150px;
width: 300px;
margin: 20px;