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/perl | |
use strict; | |
use warnings; | |
use 5.010; | |
my $polybius; | |
my %polybius = ( | |
"a" => "11", | |
"b" => "12", |
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
use strict; | |
use warnings; | |
use 5.010; | |
sub ordinal { | |
my $x = $_[0]; | |
if ( $x <= 20 ) { | |
return $x . "st\n" if $x == 1; | |
return $x . "nd\n" if $x == 2; |
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/perl | |
use strict; | |
use warnings; | |
use 5.010; | |
# Purpose: generate random strings | |
# Usage: random1(50); | |
# Default length is 8. |
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 - | |
PROGRAM="${0##*/}" | |
if [ $# -eq 0 ]; then | |
echo "$PROGRAM: create JSON objects from bash functions" | |
echo "Usage: $PROGRAM file1.sh file2.sh [> file.json]" | |
exit 1 | |
fi |
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.4 | |
import time | |
import sys | |
class CalendarData: | |
monthNames = [0,"January","February","March","April","May","June","July", | |
"August","September","October","November","December"] | |
dayNames = ["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"] |
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 clear | |
do | |
# /usr/bin/figlet -f big $(date +%I:%M:%S) | |
/usr/bin/banner $(date +%I:%M:%S) | |
read -sn1 -t 1 | |
[ $REPLY ] && clear && break | |
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
#!/bin/bash - | |
_format_phone_number() | |
{ | |
local one | |
local phone="$(tr -d '[:punct:]' <<< $1)" | |
if [[ $phone = *[!0-9]* ]] || | |
[ ${#phone} -lt 3 ] || | |
[ -z "$phone" ] |
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 - | |
printf "\n%s\n\n" "Create a .desktop launcher" | |
# because Unity doesn't have a launcher tool... | |
read -p "Name the launcher: " name | |
[ -z "$name" ] && exit 1 | |
read -p "Code to execute: " execute | |
[ -z "$execute" ] && exit 1 |
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
# This module is not finished. | |
module Hebrew | |
def self.j_to_sdn(m, d, y) | |
m, d, y = m.to_i, d.to_i, y.to_i | |
if y == 0 || y < -4713 || m <=0 || m > 12 || m <= 0 || d > 31 | |
return(0) | |
end |
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 - | |
# | |
# SCRIPT: bashlet_get_methods.sh | |
# AUTHOR: Luciano D. Cecere | |
# DATE: 11/19/2016-01:03:13 PM | |
######################################################################## | |
# | |
# bashlet_get_methods - get bashlet method names from lib file name | |
# Copyright (C) 2016 Luciano D. Cecere <[email protected]> | |
# |
NewerOlder