Skip to content

Instantly share code, notes, and snippets.

@AffanIndo
AffanIndo / commands.py
Created Jul 19, 2019
Ranger command to open tmux split in current directory
View commands.py
# You always need to import ranger.api.commands here to get the Command class:
from ranger.api.commands import *
# My additional commands
class terminal(Command):
""":terminal
Open new tmux split in the current directory.
"""
def execute(self):
View Linux Command.txt
pacman: sudo pacman -Syu PACKAGENAME # install (and update package list)
sudo pacman -S PACKAGENAME # install
pacman -Ss PACKAGENAME # search
pacman -Si PACKAGENAME # info about package
pacman -Qs PACKAGENAME # search installed package
pacman -Qi PACKAGENAME # info about installed package
pacman -Ql PACKAGENAME # list all installed package
sudo pacman -R PACKAGENAME # normal remove
sudo pacman -Rsn PACKAGENAME # remove package, dependencies, and backup configuration files
pacman -Qdt
@AffanIndo
AffanIndo / .Xdefaults
Created Dec 22, 2019
u/schorsch3000 urxvt Configuration
View .Xdefaults
urxvt.transparent: false
urxvt.shading: 15
URxvt.cursorBlink: 1
URxvt.termName: rxvt-256color
URxvt.font: xft:Fira Mono:pixelsize=15,style=regular
URxvt.boldFont: xft:Fira Mono:pixelsize=15,style=bold
URxvt.italicFont: xft:Fira Mono:pixelsize=15,style=bold
URxvt.boldItalicFont: xft:Fira Mono:pixelsize=15,style=bold
URxvt.reverseVideo: True
URxvt.letterSpace: -1
@AffanIndo
AffanIndo / FFmpeg.sh
Last active Nov 30, 2019
FFmpeg Cheat Sheet
View FFmpeg.sh
# batch convert
for i in *.mp4; do ffmpeg -i "$i" "${i%.mp4}.webm"; done
# convert from one format to another
ffmpeg -i input.mp3 output.wav
# convert from one video format to another ("-qscale" value are 0-10, 0 is the best)
ffmpeg -i input.mp4 -qscale 0 output.webm
# convert video to audio (sometimes this one is better than the custom one below)
@AffanIndo
AffanIndo / Apps.txt
Created Aug 23, 2019
Installed apps on my Manjaro Linux machine
View Apps.txt
SOFTWARE LIST:
+audacity
+blender
+compton-tryone-git (aur)
+ctags
+emacs
+feh
+inkscape
+rclone
+kdenlive
View Maintenance.txt
MAINTENANCE
[x] Install System and Application Patches/Updates
[x] $ sudo apt-get update && sudo apt-get dist-upgrade
[x] Free up Disk Space (Be Extremely Careful)
[x] $ sudo apt-get --purge autoremove
[x] $ sudo apt-get clean
[x] $ du -sh ~/.cache/thumbnails
[x] $ rm -rf ~/.cache/thumbnails/*
[x] Remove Junk Manually (Try Baobab) & Backup to Google Drive
[x] Google Drive
@AffanIndo
AffanIndo / Bypass Reddit.txt
Last active Feb 5, 2019
Bypassing DNS lookup by inserting Reddit IP to /etc/hosts or C:\Windows\System32\Drivers\etc\hosts
View Bypass Reddit.txt
151.101.53.140 reddit.com
151.101.53.140 old.reddit.com
151.101.53.140 www.reddit.com
151.101.53.140 www.old.reddit.com
198.41.209.141 http://out.reddit.com
@AffanIndo
AffanIndo / space-invaders-color.sh
Last active May 26, 2018
ANSI color scheme script featuring Space Invaders.
View space-invaders-color.sh
#!/bin/bash
#
# ANSI color scheme script featuring Space Invaders
#
# Original: http://crunchbanglinux.org/forums/post/126921/#p126921
# Modified by lolilolicon
#
f=3 b=4
for j in f b; do
@AffanIndo
AffanIndo / audacious-delete.sh
Created May 20, 2018
Delete currently playing music in Audacious. USE AT YOUR OWN RISK.
View audacious-delete.sh
trash "$(audtool current-song-filename)"
audtool --playlist-delete $(audtool --playlist-position)
audtool --playback-play
@AffanIndo
AffanIndo / 256-term.sh
Created May 20, 2018
Print out 256 colours, with each number printed in its corresponding colour.
View 256-term.sh
#!/bin/bash
# Tom Hale, 2016. MIT Licence.
# Print out 256 colours, with each number printed in its corresponding colour
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163
set -eu # Fail on errors or undeclared variables
printable_colours=256