This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MIT License | |
# http://opensource.org/licenses/MIT | |
# | |
# Copyright (c) 2019 Georgi Gerganov | |
# | |
# file_download_multi | |
# | |
# Try to download a file from a list of possible remote location (URLs) | |
# The macro loops through the list and attempts to download using | |
# the standard file(DOWNLOAD ...) function. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:set url.default_page https://google.com/ | |
:set url.searchengines '{"DEFAULT": "https://google.com/search?q={}"}' | |
:set content.headers.user_agent 'Mozilla/5.0 (X11; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0 https://accounts.google.com/*' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
# swap monitors | |
xrandr --output HDMI-0 --right-of DP-0 | |
# change keyboard speed | |
xset r rate 150 100 | |
# fix audio | |
start-pulseaudio-x11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
git clone --depth 1 --branch release https://github.com/adobe-fonts/source-code-pro.git ~/.fonts/adobe-fonts/source-code-pro | |
sudo fc-cache -f -v ~/.fonts/adobe-fonts/source-code-pro |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# custom config | |
workspace_layout tabbed | |
bindsym $mod+d exec rofi -show run | |
# Pulse Audio controls | |
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 0 +5% #increase sound volume | |
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 0 -5% #decrease sound volume | |
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 0 toggle # mute sound |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Auto-pilot for docking with the International Space Station | |
// | |
// The program uses Artificial Intelligence and Decision Trees (i.e. basic kinematics and a bunch of if statements) | |
// to perform docking with the ISS from any starting position. | |
// | |
// To use it: | |
// - open the SpaceX simulation website: https://iss-sim.spacex.com/ | |
// - open the Developer's console and paste the contents of this file | |
// | |
// Demo: https://youtu.be/jWQQH2_UGLw |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#sudo cp -v /usr/lib/slack/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/ | |
sudo snap install chromium-ffmpeg | |
sudo cp -v /snap/chromium-ffmpeg/current/chromium-ffmpeg-107578/chromium-ffmpeg/libffmpeg.so /usr/lib/x86_64-linux-gnu/opera/libffmpeg.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# record some raw audio | |
sox -d rec.wav | |
# resample to 16kHz | |
ffmpeg -y -i ./rec.wav -ar 16000 -ac 1 -c:a pcm_s16le ./rec16.wav > /dev/null 2>&1 | |
# run Whisper | |
echo "Processing ..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20:47:34 ▶ metal ▶ 12⎘ ▶ $ ▶ ./bin/main -m ../models/7B/ggml-model-q4_0.bin --export | |
main: build = 652 (b252acb) | |
main: seed = 1685900854 | |
llama.cpp: loading model from ../models/7B/ggml-model-q4_0.bin | |
llama_model_load_internal: format = ggjt v3 (latest) | |
llama_model_load_internal: n_vocab = 32000 | |
llama_model_load_internal: n_ctx = 512 | |
llama_model_load_internal: n_embd = 4096 | |
llama_model_load_internal: n_mult = 256 | |
llama_model_load_internal: n_head = 32 |