Skip to content

Instantly share code, notes, and snippets.

Install nginx and let's encrypt

install amazon linux 2023

sudo dnf install nginx  

Now setup your domain. Since don't have virtual hosts, I just edit /etc/nginx look for servername

Transparent Restaurant Backend

In this task, you're going to implement a REST API for a interacting with a menu of a restaurant. The menu is given to you as a JSON file which you will parse and perform operations on. The required features will be listed below.

Description

In this restaurant, honesty is extremely promoted. So extreme, that the restaurant declares that differing quality of ingredients are used in their meals. Like that's not enough, it also allows the customers to choose the ingredients of each meal in different qualities. Each ingredient has the following quality levels:

  • low: the cheapest
  • medium: moderate
@maple3142
maple3142 / aria2.conf
Last active May 6, 2024 16:44
aria2 on Windows configuration
rpc-secret=maple3142
enable-rpc=true
rpc-allow-origin-all=true
rpc-listen-all=true
max-concurrent-downloads=5
continue=true
max-connection-per-server=16
min-split-size=10M
split=10
max-overall-download-limit=0
<?php
class Wambo_DatevExport_Model_Export_DatevCSV extends Wambo_DatevExport_Model_Export_Abstract
{
const FOLDERNAME = 'datev';
const FILENAME_POSTFIX = '.csv';
const KONTO_DE = '8400';
const KONTO_EU_PRIVATE = '8331';
const KONTO_EU_COMPANY = '8336';
@karpathy
karpathy / min-char-rnn.py
Last active May 6, 2024 16:42
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@yasirkula
yasirkula / SceneViewUIObjectPickerContextWindow.cs
Last active May 6, 2024 16:41
Select the UI object under the cursor via right click in Unity's Scene window
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
#if UNITY_2021_2_OR_NEWER
using PrefabStage = UnityEditor.SceneManagement.PrefabStage;
using PrefabStageUtility = UnityEditor.SceneManagement.PrefabStageUtility;
@QuocCao-dev
QuocCao-dev / 1.Basic-Type.txt
Last active May 6, 2024 16:40
Typescript Exercises
/* *-*-*-*-*-*-*-*-*-*-* Challenge 1 ------------------
Create a variable with the type number and assign it an arbitrary value
*/
// ----------------------------------------------------
// *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-
// ----------------------------------------------------
/* *-*-*-*-*-*-*-*-*-*-* Challenge 2 ------------------
Create a variable with the type string and use the addition operator to put two arbitrary words together
*/
@dmancloud
dmancloud / How to Install SonarQube in Ubuntu Linux.md
Last active May 6, 2024 16:40
How to Install SonarQube in Linux

How to Install Sonarqube in Ubuntu Linux

Prerequsites

Virtual Machine running Ubuntu 22.04 or newer

Install Postgresql 15

sudo apt update
sudo apt upgrade

sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
WindowCompat.setDecorFitsSystemWindows(window, false)
super.onCreate(savedInstanceState)
setContent {
ColorPickerTheme {
Surface(
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.background
) {