Skip to content

Instantly share code, notes, and snippets.

@r1beast02
r1beast02 / vowel.sh
Created October 28, 2014 17:11
Vowel
##Ok - super hacky but hey it works!!
#!/bin/bash
ls > files.txt
cat files.txt | grep [aeiou] | sed 's/$/: This file contains a vowel/' > output.txt
cat files.txt | grep -v [aeiou] | sed 's/$/: This file does NOT contain a vowel/' >> output.txt
sort -d output.txt
@r1beast02
r1beast02 / howlong.sh
Last active August 29, 2015 14:08
NYE
#!/bin/bash
# retrieve difference seconds for new years day and today's date from epoch
nye=$( date -d "Jan 1 2015" +%s)
today=$( date +"%s")
# get difference in seconds between 2 moments and convert to days/hours/minutes/seconds
seconds=$(($nye - $today))
days=$(($seconds / 86400))
seconds=$(($seconds % 86400))
hours=$(($seconds / 3600))
seconds=$(($seconds % 3600))
@r1beast02
r1beast02 / Re-G
Created October 26, 2014 03:26
Reverse G's Challenge
cat hack.txt | tr ',' '\n' | sed 's/files=//g' > hack2.txt
@r1beast02
r1beast02 / G's challenge
Created October 26, 2014 02:15
Dudes! i think this works aye?
ls | tr '\n' ',' | sed 's/^/files=/' | sed '$s/,$//' > hack.txt; cat hack.txt

Keybase proof

I hereby claim:

  • I am r1beast02 on github.
  • I am r1beast02 (https://keybase.io/r1beast02) on keybase.
  • I have a public key whose fingerprint is 7CED 4B14 C364 B6A9 512D 0CF0 3CF9 6F77 4E15 C590

To claim this, I am signing this object: