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
| #!bash | |
| # Removing apache from autostart | |
| sudo launchctl unload -w /System/Library/LaunchDaemons/org.apache.httpd.plist | |
| brew tap homebrew/services | |
| # Installing NGINX | |
| brew install nginx | |
| # Adding NGINX to autostart | |
| ln -sfv /usr/local/opt/nginx/*.plist ~/Library/LaunchAgents |
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
| a:focus, | |
| a:active, | |
| button:focus, | |
| button:active, | |
| div:focus, | |
| div:active, | |
| select:focus, | |
| select:active, | |
| video:focus, | |
| video:active |
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
| # Reenabling blocked repos | |
| vim /etc/yum/pluginconf.d/search-disabled-repos.conf | |
| # set notify_only to zero | |
| # notify_only=0 | |
| # So now you can install all the dependencies for laravel | |
| yum --enablerepo=remi,remi-php72 install php-pecl-apcu php-cli php-pear php-pdo php-mysqlnd php-pgsql php-pecl-mongodb php-pecl-memcache php-pecl-memcached | |
| yum --enablerepo=remi,remi-php72 install php-gd php-mbstring php-mcrypt php-xml php-pecl-imagick | |
| yum --enablerepo=remi,remi-php72 install php-pecl-zip |
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
| # Creating passwordless user | |
| sudo adduser --home '/home/bry' --disabled-login --gecos 'Bryan' bry | |
| # Making user's default group www-data | |
| sudo usermod -g www-data bry | |
| # We shoud generate a deploy key | |
| sudo su - bry | |
| ssh-keygen -t rsa -b 4096 -C "bry@server" | |
| cat .ssh/id_rsa.pub |
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
| # Setting locales with root user | |
| export LANGUAGE=en_US.UTF-8 | |
| export LANG=en_US.UTF-8 | |
| export LC_ALL=en_US.UTF-8 | |
| locale-gen en_US.UTF-8 | |
| localedef -i en_US -f UTF-8 en_US.UTF-8 | |
| dpkg-reconfigure locales |
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
| Ciphers aes128-ctr,aes192-ctr,aes256-ctr | |
| HostKeyAlgorithms ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-rsa,ssh-dss | |
| KexAlgorithms ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha256 | |
| MACs hmac-sha2-256,hmac-sha2-512,hmac-sha1 | |
| LogLevel VERBOSE | |
| AuthorizedKeysFile /etc/ssh/authorized-keys/%u | |
| PermitRootLogin prohibit-password |
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
| CREATE TABLE `users` ( | |
| `id` int(11) unsigned NOT NULL AUTO_INCREMENT, | |
| `active` tinyint(1) NOT NULL, | |
| `email` varchar(255) NOT NULL DEFAULT '', | |
| `pwd` varchar(255) NOT NULL DEFAULT '', | |
| `quota` INT(10) DEFAULT '10485760', | |
| `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
| PRIMARY KEY (`id`) | |
| ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; |
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
| import os | |
| import pwd | |
| import subprocess | |
| import argparse | |
| def demote(user_uid, user_gid): | |
| def result(): | |
| report_ids('starting demotion') | |
| os.setgid(user_gid) |
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
| public static void main(){ | |
| String str = (12345).toString(); | |
| String[] arrOfStr = str.split(""); | |
| String result = ""; | |
| for (String a : arrOfStr) { | |
| String temp = Math.pow(parseInt(a), 5).toString; | |
| result = result.concat( temp ); | |
| } | |
| system.out.println( result ); |
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
| # Update Server | |
| sudo apt-get update && sudo apt-get upgrade -y | |
| # Universe + Fira Font | |
| sudo add-apt-repository universe | |
| sudo apt install fonts-firacode -y | |
| # Tools | |
| sudo apt-get install curl wget vim gdebi-core zsh git-core fontconfig -y | |
| # Setting Vim as default editor | |
| sudo update-alternatives --config editor |
OlderNewer