jerguslejko / website Goto Github PK
View Code? Open in Web Editor NEWMy personal website.
Home Page: https://jerguslejko.com
My personal website.
Home Page: https://jerguslejko.com
leverage text expansion syntax
mv file.{txt,sql}
collect vs array
apt update && apt upgrade -y
echo 'export LC_ALL="en_US.UTF-8"' >> /root/.bashrc && source /root/.bashrc
We start by creating the user, adding it to the www-data
group and setting their shell to bash
.
useradd --groups sudo,www-data --create-home --shell /bin/bash deploy
Next, we set their password to secret
.
echo deploy:secret | chpasswd
And finally, we configure their locale.
echo 'export LC_ALL="en_US.UTF-8"' >> /home/deploy/.bashrc
su -c 'ssh-keygen -t rsa -b 4096 -f /home/deploy/.ssh/id_rsa -P "" -C "$(whoami)@$(hostname)"' deploy
su -c "echo '$(cat /root/.ssh/authorized_keys)' > /home/deploy/.ssh/authorized_keys" deploy
sed -i "s/PermitRootLogin yes/PermitRootLogin no/" /etc/ssh/sshd_config
service sshd restart
add-apt-repository -y ppa:ondrej/php
add-apt-repository -y ppa:ondrej/nginx
add-apt-repository -y ppa:certbot/certbot
apt update
apt install -y build-essential
apt install -y nginx
chown deploy:www-data -R /var/www/
apt install -y php7.2-fpm php7.2-cli php7.2-mbstring php7.2-xml php7.2-zip php7.2-mysql
curl --silent --show-error https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
apt install -y mysql-server
mysql_secure_installation
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list
curl -sL https://deb.nodesource.com/setup_9.x | bash -
apt install -y nodejs yarn
server {
listen 80;
listen [::]:80;
server_name _;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
listen [::]:443;
ssl_certificate /etc/letsencrypt/live/_/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/_/privkey.pem;
server_name _;
root "/var/www/default/public";
index index.php;
charset utf-8;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { access_log off; log_not_found off; }
sendfile off;
client_max_body_size 100m;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors off;
fastcgi_buffer_size 16k;
fastcgi_buffers 4 16k;
}
location ~ /\.ht {
deny all;
}
}
service nginx reload
ufw default deny incoming
ufw default allow outgoing
ufw allow ssh
ufw allow http
ufw allow https
ufw enable
apt-get install -y software-properties-common python-certbot-nginx
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
f<letter>
F<letter>
t<letter>
T<letter>
f
, F
, t
, T
): ;
/<word>
n
N
.
๐ต
fuck yeah.
screen # start a new screen session
<ctrl> A d # detach from the current session
screen -r <sessionId?> # reattach the specified session (or the last one)
screen -ls # list all sessions
@servers(['web' => '[email protected]'])
@task('deploy', ['on' => 'web'])
cd /var/www/default
echo "=> Running 'git pull origin master'..."
git pull origin master --quiet
echo "=> Running 'composer install'..."
composer install --quiet --optimize-autoloader
echo "=> Running 'php artisan migrate'..."
php artisan migrate --quiet --force
echo "=> Running 'yarn install'..."
yarn install --silent
echo "=> Running 'yarn production'..."
yarn production
@endtask
add link to the PR
nc -l 8000 < ./http-response
# run tcp server on port 8000 (server contents from ./file)
while(true); do nc -l 8000 < ./http-response; done
# simulate "server"
nc jerguslejko.com 90 < ./http-request
# send raw request
nc -l 8000 <(echo "hey there")
# or
echo "hey there" | nc -l 8000
nc
response must by at least 5 characters ????
Yacht - confirm modal.
Why did I delete X
button in the right corner?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.