This file contains hidden or 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
# Use Oracle Linux base image https://hub.docker.com/_/oraclelinux/ | |
FROM oraclelinux:8.2 | |
# Enable Extra Packages for Enterprise Linux (EPEL) | |
RUN rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm | |
# Install Node.js and npm | |
RUN dnf install -y nodejs npm |
This file contains hidden or 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 |
This file contains hidden or 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
dnf install -y dnf-utils zip unzip | |
dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo | |
dnf install -y docker-ce --nobest |
This file contains hidden or 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 Security Group id. ID is better than name if not in default VPC | |
SG_ID="sg-goyun" | |
# Retrieve current IP address | |
IP=`curl -s http://checkip.amazonaws.com/` | |
# Authorize access on ports 22 | |
aws ec2 authorize-security-group-ingress --group-id "$SG_ID" --protocol tcp --port 22 --cidr "$IP/32" |
This file contains hidden or 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
# Enable the Windows Subsystem for Linux | |
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
# Enable Virtual Machine feature | |
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# Fix windows problem | |
dism /online /cleanup-image /restorehealth | |
sfc /scannow |
This file contains hidden or 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
-- Grant read-only permission to the MySQL user | |
-- Copy the following command and paste them into a MySQL shell. | |
GRANT SELECT, SHOW VIEW ON $database_name.* TO $user@'127.0.0.1' IDENTIFIED BY '$password'; | |
FLUSH PRIVILEGES; |
This file contains hidden or 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
#---------------------------------------------------# | |
#-- Detect Ubuntu Version.... | |
#---------------------------------------------------# | |
version=$(lsb_release -sd) | |
codename=$(lsb_release -sc) | |
echo | |
/bin/echo -e "\e[1;33m |-| Detecting Ubuntu version \e[0m" | |
if [[ "$version" = *"Ubuntu 16.04"* ]]; |
This file contains hidden or 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
function FindProxyForURL(url, host) { | |
var useSocks1080 = ["jenkins"]; | |
var useSocksAzure = ["canadacentral.cloudapp.azure.com:3389"]; | |
for (var i= 0; i < useSocksAzure.length; i++) { | |
if (shExpMatch(host, useSocksAzure[i])) { | |
return "SOCKS useSocksAzure:51080"; | |
} | |
} |
This file contains hidden or 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
static void bubbleSort(int[] lst) { | |
int n = lst.length; | |
boolean swapped; | |
do | |
{ | |
swapped = false; | |
for (int i = 0; i < n-1; i++) { | |
if (lst[i] > lst[i+1]) { | |
int temp = lst[i]; | |
lst[i] = lst[i+1]; |
This file contains hidden or 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
static void selectionSort(int[] lst) { | |
// get the length | |
int n = lst.length; | |
for (int i = 0; i < n; i++) { | |
int index = 0; | |
int smallest = lst[i]; | |
for (int j = i; j < n; j++) { | |
if (lst[j] < smallest) { | |
smallest = lst[j]; | |
index = j; |