Skip to content

Instantly share code, notes, and snippets.

@joonvena
joonvena / main.tf
Last active October 13, 2023 09:57
resource "aiven_pg" "main" {
project = var.aiven_project
service_name = var.database_name
cloud_name = "aws-eu-north-1"
plan = "free-1-5gb"
pg_user_config {
pg_version = var.pg_version
ip_filter_string = var.allowed_ips
func PostArticle(c *gin.Context) {
var input Article
if err := c.ShouldBindJSON(&input); err != nil {
c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
return
}
decodedImage, err := base64.StdEncoding.DecodeString(input.ImageB64)
if err != nil {
[Unit]
Description=Prometheus
Wants=network-online.target
After=network-online.target
[Service]
User=prometheus
Group=prometheus
Type=simple
ExecStart=/usr/local/bin/prometheus \
@joonvena
joonvena / commands.txt
Created August 4, 2020 05:07
Fix for MSI GS65 going to airplane mode after suspend (Unix)
sudo nano /etc/default/grub
# Add these inside GRUB_CMDLINE_LINUX_DEFAULT:
acpi_osi=! acpi_osi='Windows 2009' quiet splash
# Run this command and reboot:
sudo update-grub
Now when you come back from suspend you can use hardware keys to remove the airplane mode (Fn + f10).
generate_report:
if: always()
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Download reports
uses: actions/download-artifact@v1
with:
name: reports
- name: Get Repository Owner & Name
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Execute tests
uses: joonvena/[email protected]
env:
BROWSER: chrome
ROBOT_TESTS_DIR: ${{ github.workspace }}/robot_tests
name: Robot Framework
on:
push:
branches: [ master ]
name: Robot Framework
on:
push:
branches: [ master ]
jobs:
test:
runs-on: ubuntu-latest
steps:
system('clear')
system('cls')