Skip to content

Instantly share code, notes, and snippets.

View realeroberto's full-sized avatar
💭
Trust your journey.

Roberto Reale realeroberto

💭
Trust your journey.
View GitHub Profile
@bmc
bmc / stack.sh
Created October 28, 2011 21:04
A stack implementation, in bash
# A stack, using bash arrays.
# ---------------------------------------------------------------------------
# Create a new stack.
#
# Usage: stack_new name
#
# Example: stack_new x
function stack_new
{
@ludo237
ludo237 / .htaccess
Last active July 5, 2024 14:55
The ultimate .htaccess file. Please feel free to fork it, edit it and let me know what do you think about it.
# Apache configuration file
# httpd.apache.org/docs/2.2/mod/quickreference.html
# Note .htaccess files are an overhead, this logic should be in your Apache
# config if possible: httpd.apache.org/docs/2.2/howto/htaccess.html
# Techniques in here adapted from all over, including:
# Kroc Camen: camendesign.com/.htaccess
# perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/
# Sample .htaccess file of CMS MODx: modxcms.com
# This is the free sample of .htaccess from 6GO s.r.l.
# @author Claudio Ludovico Panetta (@Ludo237)
@audreyfeldroy
audreyfeldroy / pypi-release-checklist.md
Last active February 23, 2023 15:03
My PyPI Release Checklist
  • Update HISTORY.md
  • Commit the changes:
git add HISTORY.md
git commit -m "Changelog for upcoming release 0.1.1."
  • Update version number (can also be minor or major)
bumpversion patch
@XVilka
XVilka / TrueColour.md
Last active July 9, 2024 23:28
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@kylefrost
kylefrost / HOWTO.md
Last active July 31, 2021 19:24
How-To: Tweet All Commit Messages

Creating the post-commit file

Note: If you want to use your personal Twitter account to post commits, go to Step 2

  1. Create a new Twitter account for your commit messages. Example
  2. Go to http://dev.twitter.com and Sign In with your Twitter account you are posting commit messages to.
  3. Hover over your username in the top-right corner after signing in and select "My Applications"
  4. Create a new application
  5. The name, description, and site can all be whatever you want, but leave Callback URL empty
  6. Under "Application Settings" click "modify app permissions" next to "Access level"
@ldante86
ldante86 / ram.sh
Created November 7, 2016 20:08
Get ram information from /proc/meminfo
#!/bin/bash -
ram_info=/proc/meminfo
total_ram=$(bc <<< "scale=2; $(cat $ram_info | grep MemTotal | tr -d a-zA-Z:)/1024/1024")
free_ram=$(bc <<< "scale=2; $(cat $ram_info | grep MemFree | tr -d a-zA-Z:)/1024/1024")
used_ram=$(bc <<< "$total_ram-$free_ram")
echo "Total Ram: $total_ram G"
echo "Free Ram: $free_ram G"
@ldante86
ldante86 / up.sh
Created November 7, 2016 20:45
Get uptime and second conversion
#!/bin/bash -
PROGRAM="${0##*/}"
IFS="."
for i in $(cat /proc/uptime)
do
UPTIME=$i
break
done
@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 / 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 <ldante86@aol.com>
#
# This program is free software: you can redistribute it and/or modify
@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 <ldante86@aol.com>
#