Skip to content

Instantly share code, notes, and snippets.

View tazuddinleton's full-sized avatar

Taz Uddin tazuddinleton

View GitHub Profile
@tazuddinleton
tazuddinleton / mysql-docker.sh
Created November 5, 2021 19:44 — forked from spalladino/mysql-docker.sh
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
@tazuddinleton
tazuddinleton / enableOleAutomation.sql
Created November 2, 2021 18:29 — forked from JahsonKim/enableOleAutomation.sql
How to send http POST request from sql server stored procesdure.
--This query enables ole automation procedures. set 0 to disable
exec master.dbo.sp_configure 'Ole Automation Procedures', 1
RECONFIGURE
--OLE utomation disabled the following error is thrown.
--SQL Server blocked access to procedure 'sys.sp_OACreate' of component
--'Ole Automation Procedures' because this component is turned off as part
--of the security configuration for this server.
--A system administrator can enable the use of 'Ole Automation Procedures'
@tazuddinleton
tazuddinleton / logging.go
Created September 21, 2021 16:55 — forked from panta/logging.go
zerolog with file log rotation (lumberjack) and console output
package logging
import (
"github.com/rs/zerolog"
"github.com/rs/zerolog/log"
"gopkg.in/natefinch/lumberjack.v2"
"os"
"path"
"io"
)