-
Open the Terminal
-
Use
mysqldumpto backup your databases -
Check for MySQL processes with:
ps -ax | grep mysql -
Stop and kill any MySQL processes
-
Analyze MySQL on HomeBrew:
brew remove mysql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * This Google Sheets script keeps data in the specified column sorted any time | |
| * the data changes. | |
| * | |
| * After much research, there wasn't an easy way to automatically keep a column | |
| * sorted in Google Sheets, and creating a second sheet to act as a "view" to | |
| * my primary one in order to achieve that was not an option. Instead, I | |
| * created a script that watches for when a cell is edited and triggers | |
| * an auto sort. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class SecureSessionHandler extends SessionHandler { | |
| protected $key, $name, $cookie; | |
| public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
| { | |
| $this->key = $key; | |
| $this->name = $name; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Determine if an element is in the visible viewport | |
| function isInViewport(element) { | |
| var rect = element.getBoundingClientRect(); | |
| var html = document.documentElement; | |
| return ( | |
| rect.top >= 0 && | |
| rect.left >= 0 && | |
| rect.bottom <= (window.innerHeight || html.clientHeight) && | |
| rect.right <= (window.innerWidth || html.clientWidth) | |
| ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta http-equiv="Content-Type" content="text/html;charset=utf-8"> | |
| <link type="text/css" rel="stylesheet" href="style.css"/> | |
| <style type="text/css"> | |
| circle.node { | |
| cursor: pointer; | |
| stroke: #000; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Justin's simple CSS3 media queries (not mobile-first) */ | |
| /* Desktops */ | |
| @media only screen and (min-width : 1024px) { | |
| } | |
| /* Tablets */ | |
| @media only screen and (min-width : 641px) and (max-width : 1024px) { |
We have moved: https://github.com/magnetikonline/linuxmicrosoftievirtualmachines
Due to the popularity of this Gist, and the work in keeping it updated via a Gist, all future updates will take place at the above location. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* iPad In Portrait & Landscape */ | |
| @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) {} | |
| /* iPad In Landscape */ | |
| @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : landscape) {} | |
| /* iPad In Portrait */ | |
| @media only screen and (min-device-width : 768px) and (max-device-width : 1024px) and (orientation : portrait) {} | |
| /* Retina Display iPads */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Dot notation for access multidimensional arrays. | |
| * | |
| * $dn = new DotNotation(['bar'=>['baz'=>['foo'=>true]]]); | |
| * | |
| * $value = $dn->get('bar.baz.foo'); // $value == true | |
| * | |
| * $dn->set('bar.baz.foo', false); // ['foo'=>false] | |
| * |