Skip to content

Instantly share code, notes, and snippets.

View fatuk's full-sized avatar

Andrei Fatiuk fatuk

View GitHub Profile
@hail2u
hail2u / apca.js
Last active September 11, 2023 05:18
Get contrast of colors using APCA (Advanced Perceptual Contrast Algorithm)
// https://github.com/Myndex/SAPC-APCA#the-plain-english-steps-are
// Example:
// const contrast = getAPCAContrast("rgb(255, 255, 255)", "rgb(136, 136, 136)");
// This returns `66.89346308821438` (66.893%)
// SAPC-APCA README says:
// > #888 vs #fff • 66.89346308821438
// 80% means 7:1 in WCAG 2.0
// 60% means 4.5:1 in WCAG 2.0
@sven-wachsmuth
sven-wachsmuth / floating-moment.rb
Last active April 6, 2024 08:26
Sonic Pi - Soundscape for relaxing
# floating-moment.rb
# ambient soundscape for relaxing and meditation
# Created by Sven Wachsmuth
# https://gist.github.com/sven-wachsmuth/0cc06cc0d698d8932ceb142dcf5231ba
use_bpm 60
laenge_in_takten = 229 # length of the track in beats - 300 means relax 5 minutes :-)
# possible notes out of a sounds-well-scale
# Auto detect text files and perform LF normalization
* text=auto
# Custom for Visual Studio
*.cs diff=csharp
# Standard to msysgit
*.doc diff=astextplain
*.DOC diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot diff=astextplain
@linojon
linojon / parkerhill-unity.gitignore
Last active April 16, 2024 11:54
parkerhill-unity.gitignore
# This .gitignore file should be placed at the root of your Unity project directory
# First part from https://github.com/github/gitignore/blob/master/Unity.gitignore
# Parkerhill additions at the end
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/[Ll]ogs/
@findscode
findscode / dnb.rb
Created July 10, 2019 22:01
My Drum&Bass template
samps = "C:/Program Files (x86)/Sonic Pi/etc/my-samples"
use_bpm 170
live_loop :metro do
sleep 1
cue :beat
sleep 7
cue :ambient
end
@ai
ai / requirements.md
Last active December 19, 2023 14:19
Website requirements

Amplifr logo

Amplifr Landings Rules

Amplifr’s rules for landing pages created by outsource.

Requirements

@abler98
abler98 / vk-audio-downloader.js
Last active June 24, 2024 21:55
Скрипт для скачивания музыки VK
/*
Инструкция по использованию:
- заходим в раздел с аудиозаписями
- листаем в самый низ (чтобы прогрузились все аудиозаписи)
- открываем консоль браузера (F12 -> Консоль)
- вставляем код и нажимаем ENTER
- скачивание началось...
- браузер может потребовать разрешение на сохранение файлов, необходимо подтвердить действие
{
"syntax": "less",
"rules": {
"color-hex-case": ["lower", {
"message": "HEX цвета буквами строчными указывать следует"
}],
"color-named": ["never", {
"message": "Цвета ключевыми нельзя словами писать"
}],
"color-no-invalid-hex": [true, {
@bastman
bastman / docker-cleanup-resources.md
Created March 31, 2016 05:55
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm