This file contains hidden or 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
| import random | |
| HANGMANPICS = [''' | |
| +---+ | |
| | | | |
| | | |
| | | |
| | |
This file contains hidden or 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 | |
| while true; do | |
| var=1 | |
| while [[ var -lt 50000 ]]; do | |
| var=$(($var+1)) | |
| done | |
| sleep 1 | |
| done |
This file contains hidden or 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
| Different styles. | |
| #Shows User@HOSTNAME | |
| export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ " | |
| export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\] \[\033[33;1m\]\w\[\033[m\] (\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)) \$ " | |
| export PS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]\u\[\033[0;36m\] @ \w\[\033[0;32m\] - [$(git branch 2>/dev/null | grep "^*" | colrm 1 2)\[\033[0;32m\]]\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\]\[\033[0m\] ' |
This file contains hidden or 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 | |
| # This small script will fix the "missing space" caused by dd-ing fatdog isohybrid to a flash drive | |
| # making the rest of the space available again for use. | |
| # Only run this after dd-ing fatdog iso and not after anything else. | |
| # (C) jamesbond 2013, Jake SFR 2018 | |
| #set -x | |
| ### configuration | |
| #RESERVED_SPACE=1048576 # reserve 512MB (1024k secotors) by default, it will be made larger if necessary. |
This file contains hidden or 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
| #!/usr/bin/python | |
| from PIL import Image | |
| import os, sys | |
| path = "/path/to/images/" | |
| dirs = os.listdir( path ) | |
| def resize(): | |
| for item in dirs: | |
| if os.path.isfile(path+item): |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| import subprocess | |
| import sys | |
| # defining keys & strings to be used | |
| key = "org.gnome.settings-daemon.plugins.media-keys custom-keybindings" | |
| subkey1 = key.replace(" ", ".")[:-1]+":" | |
| item_s = "/"+key.replace(" ", "/").replace(".", "/")+"/" | |
| firstname = "custom" | |
| # get the current list of custom shortcuts |
This file contains hidden or 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
| #!/usr/local/bin/python | |
| # This script takes what is in the clipboard and uses key press to | |
| # paste on the focused window. I use this for pasting into a web | |
| # termianl | |
| # I have it set to run at a keypress. | |
| import pyautogui as pya | |
| import pyperclip | |
| import time |
This file contains hidden or 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
| # Pythono3 code to rename multiple | |
| # files in a directory or folder | |
| import os | |
| # Function to rename multiple files | |
| def main(): | |
| i = 0 | |
| for filename in os.listdir("xyz"): |
This file contains hidden or 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
| import re | |
| '''Good to run on all''' | |
| with open('repofiles_raw.txt') as repofile: | |
| x=repofile.readlines() | |
| done=[] | |
| newline=''.join([str(i) for i in x]) |
This file contains hidden or 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
| [[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile | |
| [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
| export PATH=/home/dallas/.rbenv/plugins/ruby-build/bin:/home/dallas/.rbenv/shims:/home/dallas/.rbenv/bin:/home/dallas/bin:/home/dallas/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/dallas/.rvm/bin:/home/dallas/.rvm/bin:/home/dallas/.vimpkg/bin | |
| # Set CLICOLOR if you want Ansi Colors in iTerm2 | |
| export CLICOLOR=1 | |
| #source /Users/dallas/.git-prompt.sh | |
| #source /Users/dallas/.bash_colors |
NewerOlder