Skip to content

Instantly share code, notes, and snippets.

View VirtuBox's full-sized avatar
🏠
Working from home

VirtuBox VirtuBox

🏠
Working from home
View GitHub Profile
@VirtuBox
VirtuBox / microsoft-dns-block.txt
Last active April 20, 2025 01:43
Blocking Microsoft DNS hosts file
0.0.0.0 feedback.microsoft-hohm.com
0.0.0.0 search.msn.com
0.0.0.0 a.ads1.msn.com
0.0.0.0 a.ads2.msn.com
0.0.0.0 a.rad.msn.com
0.0.0.0 ac3.msn.com
0.0.0.0 ads.msn.com
0.0.0.0 ads1.msn.com
0.0.0.0 b.ads1.msn.com
0.0.0.0 b.rad.msn.com
@VirtuBox
VirtuBox / owncloud-vhost
Last active June 19, 2019 09:31
Owncloud Nginx configuration with WordOps
server {
server_name site.tld www.site.tld;
access_log /var/log/nginx/site.tld.access.log rt_cache if=$loggable;
error_log /var/log/nginx/site.tld.error.log;
@VirtuBox
VirtuBox / netdata-installer.sh
Last active June 1, 2019 10:40
Netdata installer for Ubuntu/Debian
#!/usr/bin/env bash
# -------------------------------------------------------------------------
# Netdata installer for Ubuntu/Debian
# -------------------------------------------------------------------------
# Website: https://virtubox.net
# GitHub: https://github.com/VirtuBox
# Copyright (c) 2019 VirtuBox <[email protected]>
# This script is licensed under M.I.T
# -------------------------------------------------------------------------
# curl -sL vtb.cx/netdata | sudo -E bash -
@VirtuBox
VirtuBox / .gitignore
Created April 18, 2019 19:27 — forked from salcode/.gitignore
Please see https://salferrarello.com/wordpress-gitignore/ for the canonical version of this WordPress .gitignore file. Note: I do not receive notifications for comments here (because GitHub does not send notifications on Gists)
# -----------------------------------------------------------------
# .gitignore for WordPress @salcode
# ver 20180808
#
# From the root of your project run
# curl -O https://gist.githubusercontent.com/salcode/b515f520d3f8207ecd04/raw/.gitignore
# to download this file
#
# By default all files are ignored. You'll need to whitelist
# any mu-plugins, plugins, or themes you want to include in the repo.
@VirtuBox
VirtuBox / mkdocs-install-with-choco.md
Last active April 9, 2019 16:29
Mkdocs install on Windows with chocolatery

Install chocolatery

With cmd.exe

@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"

With Powershell

@VirtuBox
VirtuBox / eev3.sh
Last active October 23, 2019 09:32
wo testing script
#!/bin/bash
apt-get -qq autoremove
apt-get update
sudo bash -c 'echo -e "[user]\n\tname = abc\n\temail = [email protected]" > /home/travis/.gitconfig'
apt-get install -y --force-yes git python3-setuptools python3-dev python3-apt
wget -O ee https://raw.githubusercontent.com/EasyEngine/easyengine/develop-v3/install
bash ee develop-v3
@VirtuBox
VirtuBox / hide-admin-notices.php
Created January 30, 2019 07:07 — forked from digisavvy/hide-admin-notices.php
hide admin notices in WordPress.
add_action('admin_enqueue_scripts', 'ds_admin_theme_style');
add_action('login_enqueue_scripts', 'ds_admin_theme_style');
function ds_admin_theme_style() {
if (!current_user_can( 'manage_options' )) {
echo '<style>.update-nag, .updated, .error, .is-dismissible { display: none; }</style>';
}
}
@VirtuBox
VirtuBox / example.conf
Created December 14, 2018 17:55
Nginx PHP upstream
http {
---
# php upstream
upstream php {
server unix:/var/run/php/php7.2-fpm.sock;
}
---
nameserver 1.1.1.1
nameserver 2606:4700:4700::1111
nameserver 8.8.8.8
@VirtuBox
VirtuBox / maintenance.sh
Last active January 13, 2023 13:30
simple maintenance bash script
MAINTENANCE_APT() {
# Colors
# Colors
CSI='\033['
CEND="${CSI}0m"
CGREEN="${CSI}1;32m"
if [ "$(id -u)" = "0" ] || [ -n "$IS_SUDOERS" ]; then
export DEBIAN_FRONTEND=noninteractive