Skip to content

Instantly share code, notes, and snippets.

View manu-urba's full-sized avatar
🇨🇭

Manuel manu-urba

🇨🇭
View GitHub Profile
@manu-urba
manu-urba / website
Created September 7, 2021 11:38
Nginx reverse proxy with socket support
server {
listen 443 ssl http2;
server_name sub.domain.com;
server_tokens off;
access_log /var/log/nginx/domain.com.access.log;
error_log /var/log/nginx/domain.com.error.log error;
ssl on;
@manu-urba
manu-urba / website
Last active April 23, 2021 14:03
Nginx reverse proxy
server {
listen 443 ssl http2;
server_name sub.domain.com;
server_tokens off;
access_log /var/log/nginx/sub.domain.com.access.log;
error_log /var/log/nginx/sub.domain.com.error.log error;
ssl on;
UT_TIMEZONE_MIT = 1
UT_TIMEZONE_HAST = 2
UT_TIMEZONE_AKST = 3
UT_TIMEZONE_AKDT = 4
UT_TIMEZONE_PST = 5
UT_TIMEZONE_PDT = 6
UT_TIMEZONE_MST = 7
UT_TIMEZONE_MDT = 8
UT_TIMEZONE_CST = 9
UT_TIMEZONE_CDT = 10
/*
Unix Time Conversion
by bugsy
v0.3
http://forums.alliedmods.net/showthread.php?t=91915
TimeZone data: http://www.epochconverter.com/epoch/timezones.php
Ported to Source Mod by Milutinke (ByM)
*/
@manu-urba
manu-urba / getroman.dart
Last active November 19, 2020 10:51
Get roman number from integer
String getRoman(int num) {
const List<int> iNums = [
1,
4,
5,
9,
10,
40,
50,
90,
stock void FormatSeconds(int starting, int& days, int& hours, int& minutes, int& seconds)
{
days = starting / (24 * 3600);
starting = starting % (24 * 3600);
hours = starting / 3600;
starting %= 3600;
minutes = starting / 60 ;
starting %= 60;
seconds = starting;
}
stock void RotateRelatively(float angles[3], float degree)
{
float direction[3], normal[3];
GetAngleVectors(angles, direction, NULL_VECTOR, normal);
float sin = Sine(degree * 0.01745328); // Pi/180
float cos = Cosine(degree * 0.01745328);
float a = normal[0] * sin;
float b = normal[1] * sin;
import 'dart:io';
import 'dart:convert';
enum Letters { vowels, consonants }
enum Sesso { male, female }
const Map<String, String> months = {
"Gennaio": "A",
"Febbraio": "B",
"Marzo": "C",