Skip to content

Instantly share code, notes, and snippets.

@InvisibleRasta
InvisibleRasta / fortune_teller.py
Created November 16, 2018 02:09
Fortune Teller
# description: a game to simulate a fortune cookie
from random import randint # to generate random number
# load the fortunes
def loadFortunes():
global fortunes
fortunes[0] = "This is great, you're going to be rich and famous!"
fortunes[1] = "I'm sorry, just failure and proverty ahead for you."
@InvisibleRasta
InvisibleRasta / define_variable.py
Last active November 16, 2018 02:15
Variables and Print
# We've defined the variable "meal" here to the name of the food we ate for breakfast!
meal = "An english muffin"
# Printing out breakfast
print("Breakfast:")
print(meal)
# Now update meal to be lunch!
meal = "Pizza"
@InvisibleRasta
InvisibleRasta / ix.sh
Created November 16, 2018 20:26
pastebin at ix.io
#!/bin/sh
####Example 'ix.sh cat foobar'
"${@}" | curl -F 'f:1=<-' ix.io
@InvisibleRasta
InvisibleRasta / sysclean.sh
Created November 16, 2018 20:27
Archlinux clean system
yay -Rscn $(yay -Qtdq)
#pacman-optimize
sudo updatedb
sudo pkgfile -u
yay -Fyy
sudo pacman-db-upgrade
yes | yay -Scc
sudo sync
@InvisibleRasta
InvisibleRasta / .zshrc
Last active April 12, 2020 04:00
My .zshrc with .oh-my-zsh
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# shell-color-scripts from AUR
/opt/shell-color-scripts/colorscript.sh -r
#Enable Syntax Highlighting
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
# Path to your oh-my-zsh installation.
@InvisibleRasta
InvisibleRasta / gentoo_sysclean.sh
Created November 17, 2018 14:41
Gentoo System mantain
#!/bin/bash
# each item you want to prompt about in order
order=(eix revdep world depclean update ecleanpkg ecleandist news)
# prompt string hash for each item
declare -A prompts=(
[eix]="Sync custom package repository and the Gentoo ebuild repository using eix"
[revdep]="Check for and rebuild missing libraries (not normally needed)"
[world]="Update world"
@InvisibleRasta
InvisibleRasta / repoAddv2.sh
Created November 18, 2018 10:33
Gentoo add ebuild to custom repo
#!/bin/bash
# each item you want to prompt about in order
order=(mkdir cp chown pushd manifest popd)
# prompt string hash for each item
declare -A prompts=(
[mkdir]="Run 'mkdir -p /usr/local/portage/$1'"
[cp]="Run 'cp $3 /usr/local/portage/$1/$2'"
[chown]="Run 'chown -R portage:portage /usr/local/portage'"
#!/bin/bash
option(){
answer=$1;
case "$answer" in
1) rtorrent_restart ;;
2) deluge_restart ;;
3) rtorrent_status ;;
4) deluge_status ;;
5) hdd_usage ;;
# package management
alias pac="sudo pacman -S" # default action - install one or more packages
alias pacu="sudo pacman -Syu" # '[u]pdate' - upgrade all packages to their newest version
alias pacs="pacman -Ss" # '[s]earch' - search for a package using one or more keywords
alias paci="sudo pacman -Si" # '[i]nfo' - show information about a package
alias pacr="sudo pacman -R" # '[r]emove' - uninstall one or more packages
alias pacp="sudo pacman -Rns" # '[p]urge' - purge a package + config files
alias pacl="sudo pacman -Sl" # '[l]ist' - list all packages of a repository
alias pacll="sudo pacman -Qqm" # '[l]ist [l]ocal' - list all packages which were locally installed (e.g. AUR packages)
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d