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
import java.util.Arrays; | |
class Path { | |
static boolean isValidPosition(boolean[][] board, int row, int col) { | |
if(row >= board.length || col >= board.length) | |
return false; | |
return board[row][col]; |
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
#!/usr/bin/env bash | |
apt-get install -y gcc libpcre3 libpcre3-dev libssl-dev unzip make \ | |
libgoogle-perftools-dev google-perftools jq | |
mkdir /tmp/ngxbuild | |
cd /tmp/ngxbuild | |
latestNginx=$(curl -s http://hg.nginx.org/nginx/tags | | |
grep "^ *release-" | head -1 | cut -c 9-) | |
latestNaxsi=$(curl -s https://api.github.com/repos/nbs-system/naxsi/releases | | |
jq -r .[].tag_name | grep -v rc | head -1) |
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
## 1. Update and upgrade with apt-get | |
> apt-get update -y | |
> apt-get -y upgrade | |
## 2. Add user "admin" | |
> adduser username | |
## 3. Configure ssh |