Skip to content

Instantly share code, notes, and snippets.

View boobo94's full-sized avatar

Bogdan Alexandru Militaru boobo94

View GitHub Profile
@boobo94
boobo94 / .htaccess
Last active March 2, 2018 09:49
Leverage browser caching
# =====================[ EXPIRES CACHING ]=====================
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpg "access 1 year"
ExpiresByType image/jpeg "access 1 year"
ExpiresByType image/gif "access 1 year"
ExpiresByType image/png "access 1 year"
ExpiresByType text/css "access 1 month"
ExpiresByType text/html "access 1 month"
ExpiresByType application/pdf "access 1 month"
@boobo94
boobo94 / readme.md
Created February 23, 2018 09:24
Connect to ftp on EC2 AWS with user and password

Here's what I did on a Ubuntu EC2:

A) Login as root using the keypairs

B) Setup the necessary users and their passwords with

$ sudo adduser USERNAME $ sudo passwd USERNAME

@boobo94
boobo94 / readme.md
Created February 21, 2018 15:01
How To Add Jobs To cron Under Linux or UNIX

How Do I install or create or edit my own cron jobs?

To edit or create your own crontab file, type the following command at the UNIX / Linux shell prompt: $ crontab -e

Do I have to restart cron after changing the crontable file?

No. Cron will examine the modification time on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab file is modified.

Syntax of crontab (field description)

The syntax is:

@boobo94
boobo94 / fixCachedECDSA.md
Last active February 16, 2018 14:21
Remove the cached key for IP/DNS on the local machine:

How to fix warning about ECDSA host key

Remove the cached key for IP/DNS on the local machine:

ssh-keygen -R IP/DNS