cd /srv/http
# set owner to you
sudo chown -R you example1.com example2.com
# set group to http
sudo chgrp -R http example1.com example2.com
sudo chmod g+s example1.com example2.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # dir: /etc/pacman.d/hooks/ | |
| [Trigger] | |
| Operation = Upgrade | |
| Type = Package | |
| Target = * | |
| [Action] | |
| Description = rkhunter --propupd | |
| When = PostTransaction |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Custom PHP Settings | |
| ; --------------------- ---- -- - | |
| ; Place this file in: /etc/php/conf.d | |
| ;memory_limit = 128M | |
| memory_limit = 512M | |
| ; Fix "JIT compilation failed" in PHP 7.3 | |
| pcre.jit=0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Example class | |
| */ | |
| class Dog { | |
| private $name, $breed, $age; | |
| public function __call($Fn, $Args) { | |
| $act = substr($Fn, 0, 3); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Global .gitignore | |
| # | |
| # To take effect, place this file on your home dir and run this command: | |
| # $ git config --global core.excludesfile ~/.gitignore_global | |
| # | |
| # Created by https://www.gitignore.io/api/node,linux,macos,windows,eclipse | |
| # Edit at https://www.gitignore.io/?templates=node,linux,macos,windows,eclipse | |
| ### Eclipse ### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ----------------- ---- -- - | |
| # Custom Settings | |
| # From 2020.04.23 | |
| # Anonymize | |
| visible_hostname none | |
| forwarded_for off | |
| via off | |
| # Remove some HTTP headers |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // SomeClass.js | |
| class SomeClass { | |
| constructor() { | |
| } | |
| } | |
| export default SomeClass | |
| // index.js | |
| import SomeClass from './SomeClass.js' | |
| let x = new SomeClass() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Extensible Function | |
| * @update 2021-07-26 | |
| */ | |
| class Callable extends Function { | |
| constructor() { | |
| super('...args', 'return this.__self.__call(...args)'); | |
| this.__self = this.bind(this); | |
| return this.__self; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Mac WiFi Monitor | |
| # ------------------ ---- -- - | |
| # Keeps checking if the WiFi connection alive | |
| # by continuously sending pings to the router and public DNSes. | |
| # If the connection seemed lost nonetheless, | |
| # automatically restarts the WiFi device on your Mac | |
| # ==================================================== | |
| # Author: amekusa.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # NOTE: | |
| # | |
| # To run (DO NOT RUN on your production server): | |
| # sudo ./iptables-test.sh | |
| # | |
| # To test: | |
| # ping -c 1 <ip address> | |
| # |