Skip to content

Instantly share code, notes, and snippets.

-- Run before deleting .ndf file that causes error
-- DBCC showfilestats
DBCC ShrinkFile($LogicalFilename, EMPTYFILE)
@haroldcris
haroldcris / Git Code
Last active September 23, 2020 13:19
Replace Master Branch with other Branch
// taken from https://stackoverflow.com/questions/2862590/how-to-replace-master-branch-in-git-entirely-from-another-branch
Replace master with seotweaks branch
git checkout seotweaks
git merge -s ours master
git checkout master
git merge seotweaks
version: "3"
services:
pihole:
container_name: pihole
image: pihole/pihole:latest
ports:
- "53:53/tcp"
- "53:53/udp"
- "67:67/udp"
dotnet dev-certs https --trust
FROM php:7.4.6-apache
RUN apt-get update
# 1. development packages
RUN apt-get install -y \
git \
zip \
curl \
sudo \
@haroldcris
haroldcris / Ubuntu 20 Dns Problem
Last active January 12, 2021 00:00
Ubuntu 20 DNS Problem on reboot
https://itsfoss.com/resolvconf-permanent-ubuntu/
edit file
/etc/dhcp/dhclient.conf
remove comment
#prepend domain-name-servers 127.0.0.1;
# enable the service on reboot
@haroldcris
haroldcris / gist:efe001a3a51c46e37907307dd5495289
Last active January 29, 2021 01:20
Remote Desktop Problem
Save Remote Desktop Profile:
Add the following lines in the file
enablecredsspsupport:i:0
authentication level:i:0
# Prevent Trackers and Malwares
https://raw.githubusercontent.com/DRSDavidSoft/additional-hosts/master/domains/blacklist/adservers-and-trackers.txt
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt
https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt
https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt
https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
https://gitlab.com/my-privacy-dns/matrix/matrix/-/raw/master/source/tracking/domains.list
https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardApps.txt
https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardMobileAds.txt
https://raw.githubusercontent.com/FadeMind/hosts.extras/master/StreamingAds/hosts
@haroldcris
haroldcris / gist:6422f3de9cc14d8333044e917a2e91be
Created February 21, 2021 01:13
Restore Database without Log File
CREATE DATABASE MDF_FILE_NAME
ON (FILENAME = 'C: \Filepath\File_name.mdf')
FOR ATTACH_ REBUILD_LOG
GO
@haroldcris
haroldcris / How to signup for Github
Created April 19, 2021 12:43
Tips on signing up for Github
Goto http://github.com