Skip to content

Instantly share code, notes, and snippets.

Avatar

Vlad Zahorodnii zzag

View GitHub Profile
View dynamicwallpaperconverter
#!/usr/bin/env python3
# Copyright (C) 2020 Vlad Zahorodnii
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
View .profile.fish
# Load keychain.
if type -q keychain and status is-interactive
keychain --quiet --agents ssh id_github id_kde
end
if test -f ~/.keychain/(hostname)-fish
source ~/.keychain/(hostname)-fish
end
# Use ccache.
@zzag
zzag / tasks.json
Created Jan 25, 2019
compdb vscode task
View tasks.json
{
"version": "2.0.0",
"tasks": [
{
"label": "compdb: Generate a Compilation Database",
"type": "shell",
"command": "compdb -p /home/vlad/Workspace/KDE/build/kde/workspace/kwin list > ${workspaceFolder}/compile_commands.json",
"presentation": {
"reveal": "silent",
"focus": false,
@zzag
zzag / firefox-nightly.desktop
Created May 8, 2018
Firefox Nightly desktop file
View firefox-nightly.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Nightly
GenericName=Web Browser
Comment=Browse the Web
Exec=env GTK_THEME=Breeze-Firefox /home/vlad/Applications/firefox-nightly/firefox -P Nightly %u
Icon=/home/vlad/Applications/firefox-nightly/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
@zzag
zzag / firefox-dev.desktop
Created May 8, 2018
Firefox Developer Edition desktop file
View firefox-dev.desktop
[Desktop Entry]
Version=1.0
Name=Firefox Developer Edition
GenericName=Web Browser
Comment=Browse the Web
Exec=env GTK_THEME=Breeze-Firefox /home/vlad/Applications/firefox-dev/firefox -P Developer %u
Icon=/home/vlad/Applications/firefox-dev/browser/chrome/icons/default/default128.png
Terminal=false
Type=Application
MimeType=text/html;text/xml;application/xhtml+xml;application/vnd.mozilla.xul+xml;text/mml;x-scheme-handler/http;x-scheme-handler/https;
@zzag
zzag / gtk.css
Last active Apr 10, 2018
Breeze Firefox theme
View gtk.css
/* GTK NAMED COLORS
----------------
use responsibly! */
/*
widget text/foreground color */
@define-color theme_fg_color #232627;
/*
text color for entries, views and content in general */
@define-color theme_text_color #232627;
/*
@zzag
zzag / reformat.sh
Last active Mar 11, 2018
Re-format source tree with clang-format
View reformat.sh
find . -iname *.h -o -iname *.c -o -iname *.cpp -o -iname *.hpp \
| xargs clang-format -style=file -i -fallback-style=none
@zzag
zzag / template_madness.cpp
Created Mar 3, 2018
template madness: factorial
View template_madness.cpp
#include <iostream>
using std::cout;
using std::endl;
template <int N>
struct factorial {
constexpr static int value = N * factorial<N-1>::value;
View gradient_checking.py
import numpy as np
def eval_gradient_naive(f, x, dx=1e-4):
grad = np.zeros_like(x)
it = np.nditer(x, flags=['multi_index'], op_flags=['readwrite'])
while not it.finished:
ix = it.multi_index
@zzag
zzag / scrollbar.css
Created Jul 26, 2016
Custom Google Chrome scrollbar
View scrollbar.css
::-webkit-scrollbar {
width: 9px;
height: 9px;
background-color: rgba(0,0,0,0);
-webkit-border-radius: 100px;
}
::-webkit-scrollbar-thumb {
background: rgba(0,0,0,0.5);
border: 1px solid transparent;
You can’t perform that action at this time.