Skip to content

Instantly share code, notes, and snippets.

@pyratebeard
pyratebeard / dedsec.sh
Created July 5, 2016 07:58 — forked from gschlabitz/dedsec.sh
Echo dedsec skull and change prompt to make your shell totally haxx0r
#!/bin/bash
echo "
pN▒g▒p▒g▒▒g▒ge
▒▒▒▒▒▒▒░░▒░▒░▒
_0▒░▒░▒░░▒▒▒▒▒▒▒!
4▒▒▒▒▒░░░▒░░▒▒▒▒▒Y
│\` \~~#00░░0 MMM\"M│
\`gM░M7
│ 00q0 │
@pyratebeard
pyratebeard / term-colours.sh
Last active October 5, 2016 14:28
list the term colour numbers in colour
for i in {0..255} ; do
printf "\x1b[38;5;${i}mcolour${i}\n"
done
#!/bin/bash
targetDir=$1
cd $targetDir
for i in *; do
if [ ! -f "$i" ]; then
continue
else
mv "$i" $(echo "$i" | tr "[:upper:]" "[:lower:]" | tr " " "_")

Keybase proof

I hereby claim:

  • I am pyratebeard on github.
  • I am pyratebeard (https://keybase.io/pyratebeard) on keybase.
  • I have a public key whose fingerprint is 7A8E 129D BE67 9DAB AEB3 37C5 C787 7C71 5113 A16D

To claim this, I am signing this object:

@pyratebeard
pyratebeard / user_search.sh
Created April 25, 2017 11:55
Search /etc/passwd for usernames
#!/bin/bash -
for user in $* ; do
user_search=$(grep -c $user /etc/passwd)
case $user_search in
0) printf "User '$user' does not exist\n" ;;
1) printf "User '$user' does exist\n" ;;
*) printf "Something went wrong\n" ;;
esac
done
#!/usr/bin/env python
import string
import random
import hashlib
import fileinput
import os
# function to generate a random password of 12 characters, using upper/lowercase letters,
# digits, and a small group of punctuation characters.