- Install Homebrew (if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"- Install required tools:
| #!/usr/bin/swift sh | |
| import MacroExpress // @Macro-swift | |
| // MARK: - Parse Commandline Arguments & Usage | |
| func usage() { | |
| let tool = path.basename(process.argv.first ?? "servedocc") | |
| print( | |
| """ |
Few months ago, I've made a similar work but I wanted something a little more easier to manage. Please have a look at here for my previous work.
This time, I'm gonna do pretty much the same thing but using Pi-hole as base then modify it to include unbound and stubby.
This way, I can use the power of Pi-hole with some additional security layers:
unbound)stubby)| // dm Klopapier Widget | |
| // | |
| // Copyright (C) 2020 by marco79 <marco79cgn@gmail.com> | |
| // | |
| // Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL | |
| // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | |
| // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER | |
| // IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE |
| #!/bin/bash | |
| remote=origin ; for brname in `git branch -r | grep $remote | grep -v /master | grep -v /HEAD | awk '{gsub(/^[^\/]+\//,"",$1); print $1}'`; do git branch --track $brname $remote/$brname || true; done 2>/dev/null |
| # July 16, 2019 | |
| "bdic".tr("a-e", "l-p") | |
| # July 17, 2019 | |
| require 'zlib' | |
| Zlib.inflate("x\x9C\xCB\xCD\xCF\xCC\x03\x00\x04E\x01\xB4") | |
| # July 18, 2019 | |
| "$;6]I;@``\n".unpack1("u") |
| import Foundation | |
| // July 1, 2019 | |
| print([109, 111, 105, 110].map { String(UnicodeScalar($0)) }.joined()) | |
| // July 2, 2019 | |
| var hex: UInt32 = 0x6E696F6D | |
| let data = Data(bytes: &hex, count: MemoryLayout<UInt32>.size) | |
| String(data: data, encoding: String.Encoding.ascii) |
| @discardableResult | |
| public func with<T>(_ value: T, _ builder: (T) -> Void) -> T { | |
| builder(value) | |
| return value | |
| } | |
| @discardableResult | |
| public func with<T>(_ value: T, _ builder: (T) throws -> Void ) rethrows -> T { | |
| try builder(value) | |
| return value |
| # ================================================ | |
| # PHP 7.2 | |
| # | |
| # See https://www.colinodell.com/blog/201711/installing-php-72 | |
| # ================================================ | |
| apt-get install -y apt-transport-https lsb-release ca-certificates | |
| wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg | |
| echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | tee /etc/apt/sources.list.d/php.list | |
| apt-get update | |
| apt-get install -y php7.2-cli php7.2-gd php7.2-mbstring php7.2-curl php7.2-xml php7.2-zip |
| <?php | |
| /** | |
| * User: matteo.orefice | |
| * Date: 16/02/2018 | |
| * Time: 16:57 | |
| */ | |
| namespace MatteoOrefice\Illuminate\Database\Eloquent\Concerns; |