Skip to content

Instantly share code, notes, and snippets.

View VirtusB's full-sized avatar

Virtus B. Opstrup VirtusB

View GitHub Profile
@VirtusB
VirtusB / gist:d51cc77834ed33235f4ed63381ae733e
Created December 9, 2020 08:22 — forked from avoidwork/gist:3749973
MySQL sp_split() splits a comma delimited string into a recordset & inserts it into target table or returns it
-- ----------------------------
-- Procedure structure for `sp_split`
-- ----------------------------
DROP PROCEDURE IF EXISTS `sp_split`;
delimiter ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_split`(IN toSplit text, IN target char(255))
BEGIN
# Temp table variables
SET @tableName = 'tmpSplit';
SET @fieldName = 'variable';
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^ ^$1 [N]
@VirtusB
VirtusB / open-cmd-here-admin.bat
Created August 27, 2018 07:48 — forked from jordanbtucker/open-cmd-here-admin.bat
Add an "Open command window here (Admin)" context menu to folders
@echo off
net session > nul 2>&1
if /i not %errorlevel%==0 (
echo You must run this from an elevated prompt.
goto:eof
)
call :setreg "HKCR\Directory\shell\runas"
call :setreg "HKCR\Directory\Background\shell\runas"
@VirtusB
VirtusB / MySQL_macOS_Sierra.md
Created June 9, 2018 15:05 — forked from nrollr/MySQL_macOS_Sierra.md
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

#!/bin/sh
sed -i.default "s/^zend_extension=/;zend_extension=/" /usr/local/etc/php/7.1/conf.d/ext-xdebug.ini
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
launchctl load ~/Library/LaunchAgents/homebrew.mxcl.php71.plist
sudo brew services restart php71
echo "xdebug disabled"