This file contains 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
Source: https://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html | |
This page collects hints how to improve the security of nginx web servers running on Linux or UNIX-like operating systems. | |
Default Config Files and Nginx Port | |
/usr/local/nginx/conf/ or /etc/nginx/– The nginx server configuration directory and /usr/local/nginx/conf/nginx.conf is main configuration file. | |
/usr/local/nginx/html/ or /var/www/html– The default document location. | |
/usr/local/nginx/logs/ or /var/log/nginx – The default log file location. | |
Nginx HTTP default port : TCP 80 |
This file contains 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
Go to Bitbucket and create a new repository (its better to have an empty repo) | |
git clone git@bitbucket.org:abc/myforkedrepo.git | |
cd myforkedrepo | |
Now add Github repo as a new remote in Bitbucket called "sync" | |
git remote add sync git@github.com:def/originalrepo.git | |
Verify what are the remotes currently being setup for "myforkedrepo". This following command should show "fetch" and "push" for two remotes i.e. "origin" and "sync" | |
git remote -v |
This file contains 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
#!/bin/bash | |
U=${SUDO_USER:=${USER}} | |
if [[ -x `which realpath` ]]; then | |
T=$(realpath ${BASH_SOURCE[0]:=${0}}) | |
else | |
T=${BASH_SOURCE[0]:=${0}} | |
fi | |
D=$(dirname ${T}) | |
#apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-turbo-dbg libmcrypt-dev libssl-dev libc-client2007e libc-client2007e-dev libxml2-dev libbz2-dev libcurl4-openssl-dev libjpeg-dev libpng12-dev libfreetype6-dev libkrb5-dev libpq-dev libxml2-dev libtidy-dev libmemcached-dev imagemagick-dev msgpack-dev |
The url has changed: https://odan.github.io/2017/04/17/rest-restful-api-quick-reference.html
This file contains 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 Dictionary<string, string> getExifDataViaTool(string sourceFile, string parameters = "-a") | |
{ | |
var result = new Dictionary<string, string>(); | |
// escaping path command line | |
sourceFile = Regex.Replace(sourceFile, @"(\\*)" + "\"", @"$1\$0"); | |
sourceFile = Regex.Replace(sourceFile, @"^(.*\s.*?)(\\*)$", "\"$1$2$2\""); | |
var argumentsString = parameters + " " + sourceFile; |
This file contains 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
## Useful Commands | |
Get kubectl version | |
kubectl version | |
Get cluster info: |
This file contains 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
#!/bin/bash | |
set -e -o pipefail | |
latest_nginx=$(curl -L http://nginx.org/en/download.html | egrep -o "nginx\-[0-9.]+\.tar[.a-z]*" | head -n 1) | |
latest_libressl=$(curl -L http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/ | egrep -o "libressl\-[0-9.]+\.tar\.gz" | tail -n 1) | |
(curl -fLRO "http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${latest_libressl}" && tar -xaf "${latest_libressl}") & | |
(curl -fLRO "http://nginx.org/download/${latest_nginx}" && tar -xaf "${latest_nginx}") & | |
wait |
#Setting Up TinCan API with Moodle LMS and Learning Locker LRS
#Part 1: Virtual Container
Before we get our hands dirty with the entire setup, it is necessary to ensure we do not mess with the existing installation. Setting up and configuring a local server is tricky and may sometimes break your existing configuration rendering other programs which rely on it useless. So we will use LXC to create a virtual container, where we will do all good stuff. You can read the official LXC documentation here or a brief introduction about LXC here or get started right away with the commands below.
sudo apt-get install lxc lxd-client
sudo lxc-create -t download -n LMSprototype
Follow [steps][1]:
- Download: http://download.microsoft.com/download/9/1/E/91E9F42C-3F1F-4AD9-92B7-8DD65DA3B0C2/mvmc_setup.msi (thanks @xavery)
- Open Powershell as administrator and run
Import-Module 'C:\Program Files\Microsoft Virtual Machine Converter\MvmcCmdlet.psd1'
- And after
ConvertTo-MvmcVirtualHardDisk -SourceLiteralPath d:\scratch\vmx\VM-disk1.vmdk -VhdType DynamicHardDisk -VhdFormat vhdx -destination c:\vm-disk1