For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
## check the return of a command | |
if command; then | |
[...] | |
fi | |
## check by string comparison / numerical / file existence / or more | |
if [[ CHECK ]]; then | |
[...] | |
fi |
# While loop | |
while [ $i -lt 10 ]; | |
do | |
[...] | |
done | |
# C style for loop | |
for (( c=1; c<=$MAX_VAL; c++ )) | |
do | |
[...] |
#Spider Websites with Wget – 20 Practical Examples | |
Wget is extremely powerful, but like with most other command line programs, the plethora of options it supports can be intimidating to new users. Thus what we have here are a collection of wget commands that you can use to accomplish common tasks from downloading single files to mirroring entire websites. It will help if you can read through the wget manual but for the busy souls, these commands are ready to execute. | |
1. Download a single file from the Internet | |
wget http://example.com/file.iso | |
2. Download a file but save it locally under a different name | |
wget ‐‐output-document=filename.html example.com |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <netinet/tcp.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <netinet/in.h> |
There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.
So, these are the different settings we are going to compare:
#!/bin/bash | |
# Retrieves image configuration using | |
# private registries without authentication | |
set -o errexit | |
# Address of the registry that we'll be | |
# performing the inspections against. | |
# This is necessary as the arguments we |
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### | |
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget. | |
### You can download all the binaries one-shot by just giving the BASE_URL. | |
### Script might be useful if you need Oracle JDK on Amazon EC2 env. | |
### Script is updated for every JDK release. | |
### Features:- | |
# 1. Resumes a broken / interrupted [previous] download, if any. | |
# 2. Renames the file to a proper name with including platform info. |
# For understanding LXC see https://wiki.debian.org/LXC | |
# Based on: | |
# lxd + docker: https://stgraber.org/2016/04/13/lxd-2-0-docker-in-lxd-712/ | |
# lxd network (static ip): https://stgraber.org/2016/10/27/network-management-with-lxd-2-3/ | |
LXD_NETWORK="dev-network2" | |
# install lxd 2.3+ | |
apt-get install software-properties-common |