curl -OL https://golang.org/dl/go1.17.1.linux-amd64.tar.gz
tar xfz go1.17.1.linux-amd64.tar.gz
sudo mv go /usr/local
sudo ln /usr/local/go/bin/go /usr/local/bin/go
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 | |
sudo apt-get remove docker-compose | |
sudo curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose |
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
version: "3.7" | |
services: | |
kong-db: | |
image: postgres:9.6-alpine | |
container_name: kong-db | |
env_file: | |
- kong-db.env | |
healthcheck: | |
test: ["CMD-SHELL", "pg_isready -U postgres"] | |
interval: 5s |
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 | |
# Start kong database | |
docker-compose up -d kong-db | |
# Check database start finished | |
export CHECK="starting" | |
while [ "$CHECK" != "healthy" ] | |
do |
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 math | |
import random | |
import string | |
def generate_random_digit(length): | |
digits = "0123456789" | |
otp = "" | |
for i in range(length): | |
otp += digits[math.floor(random.random() * 10)] |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.2/pdfmake.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdfmake/0.2.2/vfs_fonts.min.js"></script> | |
<title>Document</title> | |
</head> |
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
version: '3' | |
services: | |
# MongoDB: https://hub.docker.com/_/mongo/ | |
mongo: | |
image: mongo:4.2 | |
volumes: | |
- mongo_data:/data/db | |
networks: | |
- graylog | |
# Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/7.10/docker.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
#!/bin/bash | |
echo -n "Enter Password: " && head -1 </dev/stdin | tr -d '\n' | sha256sum | cut -d" " -f1 |
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 React from 'react' | |
import './App.css' | |
function App() { | |
const handleFile = (e: React.ChangeEvent<HTMLInputElement>) => { | |
// if (!e.target.files) return // solv #1 remove null FileList | null | |
const files = e.target.files! // solv #2 it will not be null, trust me". haha | |
Array.from(files).forEach(async (f) => console.log(f)) | |
} |
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
# encrypt: | |
openssl enc -aes-256-cbc -pass pass:123456 -md sha512 -pbkdf2 -iter 100000 -salt -in message.txt -out message.bin | |
# decrypt: | |
openssl enc -d -aes-256-cbc -pass pass:123456 -md sha512 -pbkdf2 -iter 100000 -salt -in message.bin -out message.dec |
OlderNewer