This script is a simple tool to test if server allows cross-origin resource sharing (CORS), i.e. if server allows requests from some domain.
Download script to ~/.local/bin/cors_test.sh
#!/bin/bash | |
# this script adds SFTP user and restrict his access to specific directory | |
# you can use it to limit SFTP user access to specific web site under /var/www | |
# tested on Ubuntu 18.04 | |
SSH_CONFIG=/etc/ssh/sshd_config | |
VSFTPD_CONFIG=/etc/vsftpd.conf | |
BACKUP_DIR=/var/local/sftp-user/backups/$(date +%F) |
YAML 1 hr 38 mins █████▌░░░░░░░░░░░░░░░ 26.2% | |
JavaScript 1 hr 28 mins ████▉░░░░░░░░░░░░░░░░ 23.7% | |
Other 1 hr 2 mins ███▌░░░░░░░░░░░░░░░░░ 16.7% | |
TypeScript 37 mins ██░░░░░░░░░░░░░░░░░░░ 10.0% | |
JSON 35 mins ██░░░░░░░░░░░░░░░░░░░ 9.6% |
{ | |
"basics": { | |
"name": "Vladimir Lazić", | |
"picture": "https://avatars2.githubusercontent.com/u/108793?v=4", | |
"label": "Self Employed", | |
"headline": "Software Engineer", | |
"summary": "Software Engineer with industry experience in building web apps, kind of a bookworm and a passionate hiker :)\n\nI've always aspired to learn all aspects of web development and that’s how my journey started as a fullstack web developer (LAMP stack and KnockoutJS/jQuery).\n\nThen I decided to pick some area to specialize in, and I picked frontend (mainly React and TypeScript) which I worked on for a few years.\n\nAs a long time Linux user I have my own collection of Bash and Python scripts that I use on a daily basis and in my previous job in Easy Aerial I got to implement this knowledge. I was fortunate to be involved in a lot of DevOps activities including setting up BitBucket Pipelines, Bash scripts, Vagrant VM’s etc. There I had the opportunity to mentor a lot of brilliant young programmers and to be a team lea |
#!/bin/bash | |
# this script requires ImageMagick suite to be installed | |
sizes=(32 57 72 114 144) | |
identify $1 >/dev/null || { | |
echo "First parameter shoud be your favicon file" | |
exit 0 | |
} |
# Script hosted here: https://gist.github.com/gianlucaparadise/10286e0b1c5409bd1049d67640fb7c03 | |
# A repository bigger than 1 GB can't be cloned normally. | |
# In order to clone it, you need to follow the instructions from: | |
# https://stackoverflow.com/a/53068021/6155481 | |
# To execute: | |
# sh big-repo-cloner.sh <repo_uri> <repo_destination_folder> [<checkout_branch_name>] | |
# repo_uri and repo_destination_folder are mandatory | |
# checkout_branch_name is optional |
#!/usr/bin/env bash | |
# TODO: get more ideas from: https://github.com/martinburger/bash-common-helpers | |
blue='\033[0;34m' | |
nocolor='\033[0m' | |
red="\033[0;31m" | |
green="\033[0;32m" | |
# https://github.com/martinburger/bash-common-helpers/blob/master/bash-common-helpers.sh |
#!/usr/bin/env bash | |
blue='\033[0;34m' | |
nocolor='\033[0m' | |
green='\033[0;32m' | |
downloadFolder="download" | |
playlistFile="playlist.txt" | |
function exit_on_error_and_undefined() { |
node_modules |
#!/bin/bash | |
DOMAINS_FILE="domains.txt" | |
OUTPUT_FILE="domains_with_header.txt" | |
PROGRESS_FILE="progress.txt" | |
HEADER="X-Booking-Engine" | |
# Function to print the current status | |
print_status() { | |
echo "Total domains: $total_lines" |