Skip to content

Instantly share code, notes, and snippets.

View wvovaw's full-sized avatar
👀
I don't blink anymore...

Vladimir Ivakhno wvovaw

👀
I don't blink anymore...
View GitHub Profile
@wvovaw
wvovaw / colors.ini
Created December 31, 2020 15:55
Add to the end of ~/.config/spicetify/Themes/Dribbblish/colors.ini
[solarized-dark]
main_fg = fdf6e3
active_control_fg = fdf6e3
secondary_fg = eee8d5
secondary_bg = 073642
main_bg = 002b36
sidebar_and_player_bg = 002b36
cover_overlay_and_shadow = 000000
indicator_fg_and_button_bg = 2aa198
pressing_fg = FF5C86
@wvovaw
wvovaw / Makefile
Last active May 7, 2021 15:56
Makefile for small C++ projects
# Add name of the program as target
TARGET = out
CXX = g++
# Add libs
LIBS = -lm
CPPFLAGS = -std=c++17 -pedantic -Wall -Wno-deprecated-declarations -Os
OBJS = $(patsubst %.cpp, %.o, $(wildcard *.cpp))
INCS = $(wildcard *.h)
all : options ${TARGET}
@wvovaw
wvovaw / Makefile
Created May 7, 2021 15:58
Makefile for small C projects
# Add name of the program as target
TARGET = out
CC = cc
# Add libs
LIBS = -lm
CFLAGS = -std=c99 -pedantic -Wall -Wno-deprecated-declarations -Os
OBJS = $(patsubst %.c, %.o, $(wildcard *.c))
INCS = $(wildcard *.h)
all : options ${TARGET}
@wvovaw
wvovaw / CMakeLists.txt
Created May 7, 2021 16:01
CMakeLists.txt for C/C++ projects
cmake_minimum_required(VERSION 3.10)
set(PROJECT_NAME myProject)
project(${PROJECT_NAME} VERSION 1.0 LANGUAGES CXX) # OR C
set(EXECUTABLE_OUTPUT_PATH bin/${CMAKE_BUILD_TYPE})
file(GLOB_RECURSE SOURCE_FILES src/*)
file(GLOB_RECURSE SOURCE_HEADERS include/*)
set(SOURCES ${SOURCE_FILES} ${SOURCE_HEADERS})
@wvovaw
wvovaw / vimium-options.json
Last active May 24, 2021 14:47
Vimium config. It has several search engines and Groovebox Dark theme
{
"settingsVersion": "1.66",
"exclusionRules": [
{
"pattern": "https?://mail.google.com/*",
"passKeys": ""
},
{
"pattern": "https://godbolt.org/",
"passKeys": ""
@wvovaw
wvovaw / gruvbox-colors.css
Created June 7, 2021 18:37
Gruvbox colorscheme as css variables
:root {
/* dark */
--gboxd_bg: #282828;
--gboxd_bg0: #282828;
--gboxd_bg0_h: #1d2021;
--gboxd_bg0_s: #32302f;
--gboxd_bg1: #3c3836;
--gboxd_bg2: #504945;
--gboxd_bg3: #665c54;
--gboxd_bg4: #7c6f64;
@wvovaw
wvovaw / solarized-colors.css
Created June 7, 2021 18:38
Solarized colorscheme as css variables
:root {
--solarized_base03: #002b36;
--solarized_base02: #073642;
--solarized_base01: #586e75;
--solarized_base00: #657b83;
--solarized_base0: #839496;
--solarized_base1: #93a1a1;
--solarized_base2: #eee8d5;
--solarized_base3: #fdf6e3;
--solarized_yellow: #b58900;
@wvovaw
wvovaw / discord_install.sh
Last active June 25, 2024 17:18
Discord instalation script
#!/bin/env bash
# Ask a pass if not enough privileges
if (($EUID != 0)); then
if hash pkexec 2>/dev/null; then
pkexec "$0" "$@"
elif hash gksu 2>/dev/null; then
if [[ -t 1 ]]; then
sudo "$0" "$@"
else
@wvovaw
wvovaw / NASA original Mars rovers API.postman_collection.json
Created November 6, 2022 18:58
Original NASA Mars photos API schema for Perseverance and Curiosity rovers
{
"info": {
"_postman_id": "5be5d43b-8bce-418d-a8f8-9eb7a42c2911",
"name": "NASA original API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "14509461"
},
"item": [
{
"name": "Mars2020,ingenuity",
@wvovaw
wvovaw / utils.ts
Last active July 21, 2024 15:00
Some JS and TS code snippets that I need to use sometimes
// Generate random string
export const generateUID = (length: number) =>
Array(length)
.fill("")
.map((v) => Math.random().toString(36).charAt(2))
.join("");
// Convert ArrayBuffer to HEX string
export const bytesToHEX = (bytes: ArrayBuffer) =>
Array.from(new Uint8Array(bytes)).map(b => b.toString(16).padStart(2, '0')).join('');