Skip to content

Instantly share code, notes, and snippets.

View mattclements's full-sized avatar

Matt Clements mattclements

View GitHub Profile
@JonoB
JonoB / gist:de0af1bfb34666e887d6
Last active August 29, 2015 14:22
Laravel Upgrade Form helpers from L4 to L5
Regex search and replace for form helpers as follows:
Search:
\{\{ (Form\:\:.+) \}\}
Replace:
{!! $1 !!}
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="/apple-touch-icon-152.png">
<link rel="apple-touch-icon-precomposed" sizes="144x144" href="/apple-touch-icon-144.png">
<link rel="apple-touch-icon-precomposed" sizes="120x120" href="/apple-touch-icon-120.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114" href="/apple-touch-icon-114.png">
<link rel="apple-touch-icon-precomposed" sizes="76x76" href="/apple-touch-icon-76.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72" href="/apple-touch-icon-72.png">
<link rel="apple-touch-icon-precomposed" sizes="60x60" href="/apple-touch-icon-60.png">
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="/apple-touch-icon-57.png">
<link rel="apple-touch-startup-image" href="/apple_startup_image.png">
<link rel="icon" type="image/png" href="/favicon-16.png" sizes="16x16">
<?php
/*
Template Name: Edit Listing
*/
add_filter('gform_field_value_post_title', 'vg_post_title');
add_filter('gform_field_value_post_content', 'vg_post_content');
add_filter('gform_field_value_post_add', 'vg_post_add');
add_filter('gform_field_value_post_mobile', 'vg_post_mobile');

Goals of a bug report

The single goal of a bug report is to fix the bug. Chances for that are higher, when the report is clear, reproduceable and follows a fixed structure. Keep in mind, that not only developers need to understand a bug, but also the product owner and testers who may not have such a deep technical knowhow. Customers and other stakeholders have to talk about the bug. A software tester has to be able to reproduce it, and a developer is in charge to fix it. The following description is a "best practice" for reporting a bug.

Contents of a bug report

  1. Title
  2. Steps to reproduce
  3. Current result
  4. Expected result
  5. Environment
@jhjguxin
jhjguxin / creating-nested-resources-in-ruby-on-rails-3-and-updating-scaffolding-links-and-redirection.markdown
Created July 9, 2012 03:32
Creating nested resources in ruby on rails 3 and updating scaffolding links and redirection
@mattclements
mattclements / jquery.placeholder.js
Created March 28, 2012 08:53
Placeholder Support for IE6-8
/*
Original From: http://kamikazemusic.com/quick-tips/jquery-html5-placeholder-fix/
Additions by Matt Clements
Licence: http://mattclements.mit-license.org/
Adjusted to look at .change too
Added support for textarea's and pre-set values on fields
*/
$(document).ready(function() {
@0xced
0xced / CLAlert.h
Last active January 17, 2021 13:26
CLAlert
/*
* CLAlert is a drop-in replacement for NSAlert
*
* A CLAlert is exactly the same as a NSAlert, except for the alert style behavior
*
* - An alert with the informational style (NSInformationalAlertStyle) will always display a "Note icon" (kAlertNoteIcon)
* - An alert with the warning style (NSWarningAlertStyle) will always display a "Caution icon" (kAlertCautionIcon)
* - An alert with the critical style (NSCriticalAlertStyle) will always display a "Stop icon" (kAlertStopIcon)
*
* Tested on Mac OS X 10.5.8, 10.6.1 and 10.11.5