This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
####Example 'ix.sh cat foobar' | |
"${@}" | curl -F 'f:1=<-' ix.io |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
yay -Rscn $(yay -Qtdq) | |
#pacman-optimize | |
sudo updatedb | |
sudo pkgfile -u | |
yay -Fyy | |
sudo pacman-db-upgrade | |
yes | yay -Scc | |
sudo sync |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
option(){ | |
answer=$1; | |
case "$answer" in | |
1) rtorrent_restart ;; | |
2) deluge_restart ;; | |
3) rtorrent_status ;; | |
4) deluge_status ;; | |
5) hdd_usage ;; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
OlderNewer