Skip to content

Instantly share code, notes, and snippets.

View remibreton's full-sized avatar
🤖

Rémi Breton remibreton

🤖
  • Ubisoft
  • Montréal
View GitHub Profile
UPDATE t1 LEFT JOIN t2 ON t2.id = t1.id SET t1.col1 = newvalue WHERE t2.id IS NULL
/^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test('[email protected]');
UPDATE table SET field = REPLACE(field, 'string', 'anothervalue') WHERE field LIKE '%string%';
@remibreton
remibreton / HTML: Head tags
Last active December 16, 2015 07:19
Social media friendly head tags
<!-- Prefetching -->
<link rel="dns-prefetch" href="//fonts.googleapis.com">
<link rel="dns-prefetch" href="//ajax.googleapis.com">
<link rel="dns-prefetch" href="//googlecode.com">
<!-- Stylesheets -->
<link rel="stylesheet" href="http://site.com/style.css">
<!-- Meta -->
<title>Page title - Site name</title>
@remibreton
remibreton / HTML: IE conditional tags
Last active December 16, 2015 07:19
HTML IE conditional tags
<!--[if lt IE 7]> <html class="no-js ie6 ie" lang="en"> <![endif]-->
<!--[if IE 7]> <html class="no-js ie7 ie" lang="en"> <![endif]-->
<!--[if IE 8]> <html class="no-js ie8 ie" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie9 ie" lang="en"> <![endif]-->
<!--[if gt IE 9]> <!--> <html class="no-js modern" lang="en"> <!--<![endif]-->