Skip to content

Instantly share code, notes, and snippets.

View illucent's full-sized avatar
🎯
Focusing

Andrew Starodubtsev illucent

🎯
Focusing
View GitHub Profile
@illucent
illucent / kubernetes.md
Created August 2, 2017 21:11 — forked from carlessanagustin/kubernetes.md
Kubernetes tutorial steps

1. Create cluster

Cluster up and running

minikube version
minikube start
kubectl version
@illucent
illucent / config_gnome_apps.sh
Created May 20, 2016 19:58
Configure GNOME applications
#To list all settings for a app
# gsettings list-recursively | sort | grep gedit | uniq
#gtk, shell, icon theme
gsettings set org.gnome.desktop.interface gtk-theme 'Arc'
gsettings set org.gnome.desktop.wm.preferences theme 'Arc'
gsettings set org.gnome.shell.extensions.user-theme name 'Arc-Dark'
gsettings set org.gnome.desktop.interface cursor-theme 'Paper'
gsettings set org.gnome.desktop.interface icon-theme 'Paper'
@illucent
illucent / gist:beaf4a8c6a68bd4f5670f1c6f0c8d67e
Created December 15, 2016 11:20 — forked from Spoygg/gist:3122226
Keyboard switches for XKB setxkbmap
altwin:menu = +altwin(menu)
altwin:meta_alt = +altwin(meta_alt)
altwin:ctrl_win = +altwin(ctrl_win)
altwin:meta_win = +altwin(meta_win)
altwin:left_meta_win = +altwin(left_meta_win)
altwin:super_win = +altwin(super_win)
altwin:hyper_win = +altwin(hyper_win)
altwin:alt_super_win = +altwin(alt_super_win)
altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
grp:switch = +group(switch)
@illucent
illucent / gist:8132033
Last active April 2, 2021 00:20
.bashrc file
# /etc/profile: This file contains system-wide defaults used by
# all Bourne (and related) shells.
# http://www.guguncube.com/259/unix-collection-of-useful-bash-aliases
# aliases//http://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html
# http://dotfiles.org/~basileaf/.bashrc
[ -z "$PS1" ] && return
if [ -n "$PS1" ]; then PATH='cw-definitions-path':$PATH; export PATH; fi
# -*- coding: utf-8 -*-
# grub2-editenv /boot/grub2/grubenv create
# dracut --regenerate-all -fv && grub2-mkconfig -o /boot/grub2/grub.cfg
# https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault
# https://utcc.utoronto.ca/~cks/space/blog/linux/Fedora30GrubBLSGotcha
# https://www.if-not-true-then-false.com/2015/fedora-nvidia-guide/
# ## Backup old initramfs nouveau image ##
# mv -fu /boot/initramfs-$(uname -r).img /boot/initramfs-$(uname -r)_orig.img
## Create new initramfs image ##
# dracut -vf --install "/usr/lib/firmware/radeon/*" --kver $(uname -r)
# /etc/security/limits.conf
#
#This file sets the resource limits for the users logged in via PAM.
#It does not affect resource limits of the system services.
#
#Also note that configuration files in /etc/security/limits.d directory,
#which are read in alphabetical order, override the settings in this
#file in case the domain is the same or more specific.
#That means for example that setting a limit for wildcard domain here
#can be overriden with a wildcard setting in a config file in the

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@illucent
illucent / ffmpeg-extract-keyframes.sh
Created January 23, 2019 10:36 — forked from savvot/ffmpeg-extract-keyframes.sh
Extract only keyframes (I-frames) from video to images with console ffmpeg
ffmpeg -ss <start_time> -i video.mp4 -t <duration> -q:v 2 -vf select="eq(pict_type\,PICT_TYPE_I)" -vsync 0 frame%03d.jpg
@illucent
illucent / primes.py
Created January 1, 2019 23:10 — forked from vegard/primes.py
Prime factorisation diagram
# -*- coding: utf-8 -*-
#
# Author: Vegard Nossum <vegard.nossum@gmail.com>
import math
import os
import sys
import cairo

Quick reference: Math

Data properties

  • Math.E: number ES1

    Euler’s number, base of the natural logarithms, approximately 2.7182818284590452354.

  • Math.LN10: number ES1