Skip to content

Instantly share code, notes, and snippets.

View fatuk's full-sized avatar

Andrew Fatuk fatuk

  • Georgia, Tbilisi
View GitHub Profile
@fatuk
fatuk / floating-moment.rb
Created August 30, 2023 11:30 — forked from sven-wachsmuth/floating-moment.rb
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
@fatuk
fatuk / dnb.rb
Created August 30, 2023 11:29 — forked from findscode/dnb.rb
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
@fatuk
fatuk / ambient1
Created August 30, 2023 11:07 — forked from darinwilson/ambient1
Ambient experiment using Sonic Pi
# Ambient experiment for Sonic Pi (http://sonic-pi.net/)
#
# The piece consists of three long loops, each of which plays one of
# two randomly selected pitches. Each note has different attack,
# release and sleep values, so that they move in and out of phase
# with each other. This can play for quite awhile without
# repeating itself :)
live_loop :note1 do
use_synth :hollow
@fatuk
fatuk / ambient.rb
Created July 19, 2023 13:11 — forked from xavriley/ambient.rb
Ambient piece in Sonic Pi using multiple pentatonic scales
live_loop :foo do
with_fx :echo, mix: 0.3 do
sample :elec_tick if spread(2,7).tick
pattern1 = (knit :a3, 1, :d3, 1, :g3, 1)
pattern2 = (knit :a3, 1, :d3, 1, :g3, 1, :a0, 1)
pattern3 = (knit :a3, 1, :d3, 1, :g3, 1, :a5, 1)
structure = (knit pattern1, 128, pattern2, 32, pattern3, 32).tick(:structure)
@fatuk
fatuk / midi.rb
Created July 19, 2023 13:08
Sonic PI midi example
live_loop :midi_piano do
use_real_time
note, velocity = sync "/midi:mpk_mini_mk_ii_0:1/note_on"
synth :zawa, note: note, amp: 1
end
#!/bin/bash
IDS=$(cat app/javascript/application/icons/icon-sprites.svg | awk 'match($0, /id="v2-icon-/) { print $2 }')
for ID in $IDS
do
IconName=$(echo $ID | awk '{print substr($0, 13, length($0)-13)}')
IconsInUse=$(grep -rnw 'app/javascript/react-app' -e 'name="$IconName"')
SearchCommand="grep -rnw 'app/javascript/react-app' -e 'name=\"$IconName\"\|icon=\"$IconName\"\|iconName=\"$IconName\"'"
SearchResult=$(eval $SearchCommand)
@fatuk
fatuk / frontend.md
Last active April 14, 2022 07:47
Mermaid Frontend interview scheme

graph TD Frontend(Frontend Interview)

Frontend --> | 10 min | Experience(Опыт работы)
Frontend --> | 20 min | Live(Live coding)
Frontend --> | 90 min | Questions(Вопросы)

Questions --> Markup(Верстка)
Questions --> JS(JS)

Questions --> TS(TS)

@fatuk
fatuk / live-coding.js
Last active September 13, 2021 12:15
const data = [
{id: 1, name: 'John', surname: 'Doe', age: 34},
{id: 2, name: 'John', surname: 'Doe', age: 33},
{id: 3, name: 'John', surname: 'Doe', age: 35},
{id: 4, name: 'Mike', surname: 'Doe', age: 35},
];
const ids = query(
where({name: 'John'}),
where({surname :'Doe'}),
@fatuk
fatuk / README.md
Created September 11, 2021 22:31
/bin/bright

Copy bash script below to a file called bright

Then mark it executable with chmod a+x bright

  • Change MON="DP-1-1" to your monitor name, ie MON="HDMI-1"

  • Discover your monitor names using xrandr | grep " connected"

  • Change STEP=5 to your step value, eg STEP=2 is less noticeable

  • bright Up or bright + to increase brightness by step value

  • bright Down or bright - to decrease brightness by step value

@fatuk
fatuk / README.md
Created September 11, 2021 19:58
Lenovo Legion 5 pro WiFi driver