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
sudo apt install net-tools | |
netstat -ltnp | grep -w ':3306' |
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
git commit -m 'rebuild pages' --allow-empty |
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
CREATE DATABASE mydatabase; | |
CREATE USER myuser IDENTIFIED BY 'mypassword'; | |
GRANT ALL privileges ON mydatabase.* TO myuser; |
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
CREATE TABLE product ( | |
col1 VARCHAR2(255), | |
col2 NUMBER, | |
col3 VARCHAR2(255), | |
col4 NUMBER | |
); | |
INSERT INTO product (col1, col2, col3, col4) | |
VALUES ('A', 1, 'AA', 10); | |
INSERT INTO product (col1, col2, col3, col4) |
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
CREATE DATABASE yourdbname; | |
CREATE USER youruser WITH ENCRYPTED PASSWORD 'yourpass'; | |
GRANT ALL PRIVILEGES ON DATABASE yourdbname TO youruser; | |
-- Optional, grant superuser privileges | |
--ALTER USER youruser WITH SUPERUSER; |
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 | |
echo ">>> Installing Mailhog" | |
# Download binary from github | |
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v1.0.0/MailHog_linux_amd64 | |
# Make it executable | |
chmod +x ~/mailhog |
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
cd /opt | |
wget http://apache-mirror.rbc.ru/pub/apache/kafka/0.10.1.0/kafka_2.11-0.10.1.0.tgz | |
tar xvzf kafka_2.11-0.10.1.0.tgz | |
ln -s kafka_2.11-0.10.1.0/ kafka | |
vi /etc/systemd/system/kafka-zookeeper.service | |
[Unit] | |
Description=Apache Zookeeper server (Kafka) | |
Documentation=http://zookeeper.apache.org |
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
rabbitmqctl add_user test test | |
rabbitmqctl set_user_tags test administrator | |
rabbitmqctl set_permissions -p / test ".*" ".*" ".*" |
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
ALTER SESSION SET "_ORACLE_SCRIPT"= TRUE; | |
CREATE USER myuser IDENTIFIED BY myuser; | |
GRANT CONNECT, RESOURCE, DBA TO myuser; | |
GRANT CREATE SESSION TO myuser; |
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
#powershell script port of https://github.com/maxhauser/semver/ | |
function toSemVer($version){ | |
$version -match "^(?<major>\d+)(\.(?<minor>\d+))?(\.(?<patch>\d+))?(\-(?<pre>[0-9A-Za-z\-\.]+))?(\+(?<build>[0-9A-Za-z\-\.]+))?$" | Out-Null | |
$major = [int]$matches['major'] | |
$minor = [int]$matches['minor'] | |
$patch = [int]$matches['patch'] | |
if($matches['pre'] -eq $null){$pre = @()} | |
else{$pre = $matches['pre'].Split(".")} |
NewerOlder