Skip to content

Instantly share code, notes, and snippets.

@MRLokop
MRLokop / money-hotel-calculator.js
Last active July 20, 2022 17:30
Калькулятор цены с условием Гоши
const total = 35852 // Цена всего
const night = total / 4 // Цена одной ночи
const withoutGosha = night / 3 // Цена для 1 участника, при условии что участников 3
const withGosha = night / 4 // Цена для 1 участника, при условии что участников 4
console.log( "Gosha: " + withGosha * 2 ) // Сколько Георгий должен за 2 ночи
console.log( "Other: " + ((withoutGosha * 2) + (withGosha * 2)) ) // Сколько должен каждый другой участник
@ctron
ctron / tekton-cleanup.yaml
Last active August 30, 2024 15:29
Cleaning up Tekton pipeline runs
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: cleaner
---
kind: Role
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: cleaner
@thomasbnt
thomasbnt / code_colors_discordjs.md
Last active November 17, 2024 13:42
Code colors for embed discord.js

Here is an updated list of the colors that are currently implemented with a name. To using colors on discord.js, this is a typedef Colors, Colors.Aqua to get the Aqua color.

Name Int value Hex Code
Default 0 #000000
Aqua 1752220 #1ABC9C
DarkAqua 1146986 #11806A
Green 5763719 #57F287
DarkGreen 2067276 #1F8B4C
@nalgeon
nalgeon / cities.md
Last active November 14, 2024 15:48
Города России с координатами
@petrklus
petrklus / rgb_to_kelvin.py
Last active October 21, 2024 06:05
Kelvin to RGB in python
"""
Based on: http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
Comments resceived: https://gist.github.com/petrklus/b1f427accdf7438606a6
Original pseudo code:
Set Temperature = Temperature \ 100
Calculate Red:
If Temperature <= 66 Then
@willurd
willurd / web-servers.md
Last active November 19, 2024 21:47
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000