Skip to content

Instantly share code, notes, and snippets.

View ldante86's full-sized avatar

Luciano Dante Cecere ldante86

View GitHub Profile
@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 / 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 / hexnote.sh
Created November 16, 2016 06:15
convert decimal to hexadecimal
#!/bin/bash -
#
# SCRIPT: hexnote
# AUTHOR: Luciano D. Cecere
########################################################################
#
# hexnote - convert base 10 integers to hexadecimal notation
# Copyright (C) 2015 Luciano D. Cecere <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
@ldante86
ldante86 / exnote.sh
Created November 16, 2016 06:14
decimal to exponential notation
#!/bin/bash -
#
# SCRIPT: exnote
# AUTHOR: Luciano D. Cecere
########################################################################
#
# exnote - convert signed decimals and integers to exponential notation
# Copyright (C) 2015 Luciano D. Cecere <[email protected]>
#
# This program is free software: you can redistribute it and/or modify
@ldante86
ldante86 / markdown.nanorc
Created November 16, 2016 04:54
markdown syntax highlighting for nano
## Here is an example for markdown.
##
syntax "markdown" "\.(md|MD)$"
color brightred "#*"
color white "^\* "
color red "\*\*"
@ldante86
ldante86 / mkpr.sh
Last active November 16, 2016 15:51
Create new shell project
#!/bin/bash -
# SCRIPT: mkpr
# AUTHOR: Luciano D. Cecere
# YEAR: 2016
# PURPOSE: This script creates a new shell project with common directories and files included.
# USAGE: mkpr project-name version
# NOTE: If a version number is not specified, 0.0.1 is used by default.
PROGRAM="${0##*/}"
@ldante86
ldante86 / dim.sh
Created November 14, 2016 19:40
Dim the screen with xbacklight using 1, 2, 3 buttons.
#!/bin/bash -
# Dim the screen with xbacklight using 1, 2, 3 buttons.
dim()
{
local prog=/usr/bin/xbacklight
local step=20 state
which $prog >/dev/null
@ldante86
ldante86 / redditcli.sh
Created November 9, 2016 21:36
some command line functions for reddit
#!/bin/bash -
PROGRAM="${0##*/}"
REDDIT_URL="https://www.reddit.com/"
USAGE="
$PROGRAM -flag parameter
-h | --help show this help and exit
@ldante86
ldante86 / karma.sh
Created November 9, 2016 06:30
get reddit karma numbers for user
#!/bin/bash -
reddit_user="$1"
echo
echo "karma for /u/${reddit_user}"
echo
page=$(lynx -source "https://www.reddit.com/user/${reddit_user}/")
@ldante86
ldante86 / htag.sh
Last active November 9, 2016 05:47
html version of btags.sh
#!/bin/bash -
if [ ! "$1" ]; then
exit 1
fi
in_file="$1"
if [ ! -e "$in_file" ] || [ -d "$in_file" ]; then
exit 1