Skip to content

Instantly share code, notes, and snippets.

View ldante86's full-sized avatar

Luciano Dante Cecere ldante86

View GitHub Profile
@ldante86
ldante86 / roman.sh
Created November 16, 2016 06:24
number to Roman Numeral
#!/bin/bash -
#
# SCRIPT: romam
# AUTHOR: Luciano D. Cecere
# DATE: 2014
########################################################################
#
# roman - convert number (1-9999) to Roman numeral
# Copyright (C) 2014 Luciano D. Cecere <[email protected]>
#
@ldante86
ldante86 / igpay.sh
Created November 16, 2016 06:25
Text to Pig Latin
#!/bin/bash -
#
# SCRIPT: igpay
# AUTHOR: Luciano D. Cecere
# DATE: 10/18/2014-04:29:05 PM
#
########################################################################
#
# igpay - convert standard input to standard pig latin :@)
# Copyright (C) 2014 Luciano D. Cecere <[email protected]>
@ldante86
ldante86 / rot.sh
Created November 16, 2016 06:26
rotate string
#!/bin/bash -
#
# SCRIPT: rot
# AUTHOR: Luciano D. Cecere
#
########################################################################
#
# rot - rotate the alphabet and encode a string
# Copyright (C) 2014 Luciano D. Cecere <[email protected]>
#
@ldante86
ldante86 / acpi.sh
Created November 16, 2016 23:31
bash version of acpi
#!/bin/bash -
#
# SCRIPT: aacpi
# AUTHOR: Luciano D. Cecere
# DATE: 2014
#
########################################################################
#
# acpi - show laptop battery information
# Copyright (C) 2014 Luciano D. Cecere <[email protected]>
@ldante86
ldante86 / codon.sh
Created November 16, 2016 23:41
convert RNA to amino acid
#!/bin/bash -
#
# SCRIPT: codon
# AUTHOR: Luciano D. Cecere
# DATE: 10/30/2014-06:09:05 PM
PROGRAM=${0##*/}
codon()
{
@ldante86
ldante86 / convert.zsh
Created November 17, 2016 03:00
native numeric conversions for zsh
#!/usr/bin/zsh
#
# PROGRAM: convert.zsh
# AUTHOR: Luciano D. Cecere
# DATE: 2013
script=$(basename $0)
typeset -i2 bin=$2
typeset -i8 oct=$2
typeset -i16 hex=$2
@ldante86
ldante86 / binary-clock.sh
Last active November 17, 2016 23:10
A simple binary clock
#!/bin/bash -
SCRIPT: binary-clock
AUTHOR: Luciano D. Cecere
YEAR: 2016
PROGRAM="${0##*/}"
format="\n\t%s\t%s\n"
@ldante86
ldante86 / pandora.sh
Last active November 17, 2016 23:12
connect to pandora service with pianobar
#!/bin/bash -
# SCRIPT: pandora.sh
# AUTHOR: Luciano D. Cecere
# YEAR: 2014
#
# Connect to pandora service through pianobar
# Requires pandora account.
pandora=/usr/bin/pianobar
@ldante86
ldante86 / gdj_conversion.sh
Created November 17, 2016 11:51
Generate conversion chart for Gregorian-Discordian-Julian year
#!/bin/bash -
#
# SCRIPT: gdj_conversion.sh
# AUTHOR: Luciano D. Cecere
# DATE: 06/17/2015-11:08:47 AM
########################################################################
#
# gdj_conversion.sh - Generate conversion chart
# Copyright (C) 2015 Luciano D. Cecere <[email protected]>
#
@ldante86
ldante86 / fibprime.sh
Created November 17, 2016 12:00
fibonacci and prime testing
#!/bin/bash -
. testnum-lib.sh
LIMIT=${1:-50000}
_is_valid_number $LIMIT || {
if [ $NAN ]; then
echo "$LIMIT is not a positive integer"
else