Skip to content

Instantly share code, notes, and snippets.

@eblumstengel
eblumstengel / gist:b6a4ab3b5f874eb8702a0555e6a446db
Created January 30, 2018 08:29
MySQL 5.7 - Disable strict mode / set global sql_mode
Add a config to keep everything clean:
/etc/mysql/conf.d/disable_strict_mode.cnf
Set specific SQL modes:
[mysqld]
sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
OR simply:
@eblumstengel
eblumstengel / widget-bootstrap.html
Created September 26, 2017 22:52 — forked from alfg/widget-bootstrap.html
Bootstrap files for creating embedded widgets for your site
<html>
<head>
<title>Sample Widget Page</title>
</head>
<body>
<h1>Sample Widget Page</h1>
<script type="text/javascript" src="http://localhost:81/widget-bootstrap.js"></script>
<div id="widget-container"></div>
@eblumstengel
eblumstengel / hosts
Created April 20, 2017 22:28 — forked from eyecatchup/hosts
Disable Skype ads: 1.) Add hosts to your hosts file 2.) Flush DNS resolver cache (ipconfig /flushdns)
# Block Skype ads
127.0.0.1 *.msads.net
127.0.0.1 *.msecn.net
127.0.0.1 *.rad.msn.com
127.0.0.1 a.ads2.msads.net
127.0.0.1 ac3.msn.com
127.0.0.1 ad.doubleclick.net
127.0.0.1 adnexus.net
127.0.0.1 adnxs.com
127.0.0.1 ads1.msn.com
@eblumstengel
eblumstengel / permissions
Created February 25, 2015 15:24
File permissions
sudo chmod -R u+rwX,go+rX,go-w /path
Folders -> 755
Files -> 644
@eblumstengel
eblumstengel / gist:9489678
Created March 11, 2014 16:40
Add sth to a given date
$start_date = '2009-09-30 20:24:00';
$stop_date = date('Y-m-d H:i:s', strtotime($start_date . ' + 1 day'));