Skip to content

Instantly share code, notes, and snippets.

View alephalpha0's full-sized avatar
💫
Learning bash scripting ⌨️ and python🐍. Thanks O'reilly!

alephalpha0 alephalpha0

💫
Learning bash scripting ⌨️ and python🐍. Thanks O'reilly!
View GitHub Profile
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBF7+FsUBEACmlMeCCZ+8mbXQQJzDu8jmRrFX0ZXFWRIM75+7dmy1tsfJeoxx
N9/ug4GNP650DzOufKXPS0eeXsjQqI78/PN662HPmVm/SKfWwQNIzzEW3ua7td7o
fFLWyZuRmr9/l0h+NgYh70IYKCUNf3rD06s9kNu+qHg4olIk2k2MVpcqeU0Or2Xh
YM6ldg8LKgkIsAhqtMT72FzM3SJp5Tzx4Pe+UiZTjgj1tVv2ISI0TjSE4fYRaEur
aDqUZjB3HwV055gDRAuZoUlHFdb+KXbIl1FbX8bMWfNcPG/kUD0uWxmKYVjgZ1nU
ppZTecPdhK0x7xBW6+IxCTcJ6NsHHwu4793bZpMkyBSDrMc16RYIdg61RE41IlvW
NMqr1rRlZq6mNfZq08AVm/5URV1PNsXQ60q7wMVC17pnGw4C2iQuykSePZeawulK
9LKdmI1tgwSFwAgWZcMQk6aD0IoinmXWgXcibRpo3M3+ZyDdG7Qmy9NouIlA0i9Z
@alephalpha0
alephalpha0 / zshLoadOrder.md
Last active May 22, 2021 16:27
ZSH RC / settings load order

ZSH shell startup/shutdown files.

This is really just for my own reference, as ZSH loads its config in its own order and I can never seem to remember it. The global files (which shouldn't really be tampered with by users) will be mentioned and put into larger font than the user files. However, I won't be expounding upon them, as that is outside the purpose of this writing.

/etc/zshenv above all else. The alpha, the omega, the genesis.

.zshenv (req to be in $HOME)

@alephalpha0
alephalpha0 / Chaturbate.Core.d.ts
Created August 24, 2020 14:33
Base Typings for the Chaturbate Script API
interface IChatHost {
//#region Methods
/**
* Changes the room subject. This function is only available to apps, not bots.
*
* @param {string} new_subject The new room subject
* @memberof IChatHost
#!/data/data/com.termux/files/usr/bin/bash
# 2020-09-03 :: alephalpha0@rootofpi.me
############################################
# script to take urls shared to termux from
# android, and download the page. main use
# in my eyes is downloading raw files from
# github.
############################################
@alephalpha0
alephalpha0 / gist:38fda022ef652f8ff569c49479b40b79
Created September 3, 2020 14:34
Fluffing about; ZSH prompt
#### IN JUST 7 DAYS, HONEY, I CAN MAKE YOU A PROMPT
##
autoload -Uz promptinit ; promptinit
setopt PROMPT_SUBST
setopt PROMPT_PERCENT
PROMPT="[%~] %0 :: %DT%*
༼==_⁰⁰o> "
@alephalpha0
alephalpha0 / ffmpegForAudioConversion.md
Created October 15, 2020 09:28
the command line method to convert one audio type to the other

Requirements:

  • ffmpeg
  • libmp3lame

Variables for ref:

  • SRC = source file.
  • codec = libmp3lame IF conversion to mp3. codec = libvorbis IF conversion to ogg.

  • BKB = bitrate kilobytes.
  • OUTPUT = output file.
@alephalpha0
alephalpha0 / Ascii_Finger.md
Created October 26, 2020 02:10
Only ASCII art I'll ever need.
....................../´¯/)
....................,/¯../
.................../..../
............./´¯/'...'/´¯¯`·¸
........../'/.../..../......./¨¯\
........('(...´...´.... ¯~/'...')
.........\.................'...../
..........''...\.......... _.·´
............\..............(
@alephalpha0
alephalpha0 / imgManip.md
Created October 26, 2020 21:56
Im messing about with images on terminal. This is just for future reference.

Using ImageMagick via CLI is esoteric but some google-fu sorted me out.

convert (originalfile) -resize ##% (outputfile) will resize an image by the percentage given. Better than using -scale as it keeps the image quality up. Replace ##% with HxW to make the image resize into dimensions that best fit H or W. eg, a 1024x768 original ran through -resize 80x80 will have width of 80 and height within ratio.

Converting from one imgage type to the next is simple as well. convert png myjpeg.jpg will convert myjpeg.jpg into a png.

Using jp2a as a neat tool to output images via ascii and ansi color codes into the terminal is fun and entertaining, but fleeting.

If I want to save the output for future use and display, I have two options. The first outputs html via jp2a . jp2a --zoom-term --colors --html (originalfile) > newfile.html will put the HTML output from jp2a into an html file. If, instead, I want to save the ansi codes and ascii decorations without formatting into html,

@alephalpha0
alephalpha0 / aa0FileHeaderv1.txt
Last active November 6, 2020 18:42
personal file header {license & warranty free} OCT 2020 - v1
##################################################
## alephalpha0 | [Purpose] [Witty tag line] ##
## created:YYYY-MM-DD | modified:YYYY-MM-DD ##
##----------------------------------------------##
## https://github.com/alephalpha0 ##
#################### ###################
############# #############
## Many thanks to those who have shared and ##
## discussed their dotfiles/source code/scripts ##
## on blogs, stackoverflow, dev.to, gitlab / ##
@alephalpha0
alephalpha0 / aa0FileHeaderv2.txt
Created November 6, 2020 18:46
File header currently in use for bash scripts NOV2020 v2
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# SCRIPT_NAME_FULL || CUTE_TAG_LINE
# created:202X-XX-XX || modified:202X-XX-XX #
# product of alephalpha0's mind //// A ROOTOFPI PRODUCTION #
# http://github.com/alephalpha0 http://rootofpi.me #
######################### ###########################
################## ####################
# Many thanks to those who have shared and discussed their #
# dotfiles/source code/scripts on blogs, stackoverflow, #
# dev.to, gitlab / github, and any open forum for ideas on #