Skip to content

Instantly share code, notes, and snippets.

View illucent's full-sized avatar
🎯
Focusing

Andrew Starodubtsev illucent

🎯
Focusing
View GitHub Profile
# -*- 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

Strings

String.prototype.*

None of the string methods modify this – they always return fresh strings.

  • charAt(pos: number): string ES1

    Returns the character at index pos, as a string (JavaScript does not have a datatype for characters). str[i] is equivalent to str.charAt(i) and more concise (caveat: may not work on old engines).

@illucent
illucent / 00-lenovo-x1-5th-gen-thinkfan-setup.md
Created March 10, 2018 15:11 — forked from abn/00-lenovo-x1-5th-gen-thinkfan-setup.md
Fedora thinkfan configuration for Lenovo X1 Carbon (5th Gen)

Thinkfan Configuration Notes

This are notes for configuration thinkfan for Fedora. This configuration procedure was followed on a Lenovo Thinkpad X1 Carbon (5th Gen) running Fedora 25.

Non standard (default) configuration was required for this machine as the default sensors are not available. Eg: /proc/acpi/ibm/thermal does not exist for this model.

An annoted configuration file has been included below. However, there is no guarentee that this will work as-is on every machine.

Installation

dnf -y install thinkfan
@illucent
illucent / Unicode table
Created December 23, 2017 10:39 — forked from ivandrofly/Unicode table
Unicode table - List of most common Unicode characters *
Unicode table - List of most common Unicode characters *
* This summary list contains about 2000 characters for most common ocidental/latin languages and most printable symbols but not chinese, japanese, arab, archaic and some unprintable.
Contains character codes in HEX (hexadecimal), decimal number, name/description and corresponding printable symbol.
What is Unicode?
Unicode is a standard created to define letters of all languages ​​and characters such as punctuation and technical symbols. Today, UNICODE (UTF-8) is the most used character set encoding (used by almost 70% of websites, in 2013). The second most used character set is ISO-8859-1 (about 20% of websites), but this old encoding format is being replaced by Unicode.
How to identify the Unicode number for a character?
Type or paste a character:
Verifying my Blockstack ID is secured with the address 1oQQykB6TQXC1WbA9L38WB5ABAuZdL72m https://explorer.blockstack.org/address/1oQQykB6TQXC1WbA9L38WB5ABAuZdL72m