Skip to content

Instantly share code, notes, and snippets.

View rsvp's full-sized avatar
🎧
say hi ! https://gitter.im/rsvp/pub

Adriano rsvp

🎧
say hi ! https://gitter.im/rsvp/pub
View GitHub Profile
@rsvp
rsvp / noise.sh
Last active November 15, 2025 00:06
noise : relaxing ambient Brown noise generator (cf. white noise) | Linux bash script using sox | CogSci notes
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2019-01-02
#
# _______________| noise : ambient Brown noise generator (cf. white noise).
#
# Usage: noise [minutes=59] [band-pass freq center=1786] [wave]
# ^minutes can be any positive integer.
# Command "noise 1" will display peak-level meter.
#
# Dependencies: play (from sox package)
@rsvp
rsvp / netspeed.sh
Last active November 22, 2024 16:27
netspeed.sh : check download speed rate via command line | Linux bash script
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2013-07-11
#
# _______________| netspeed : check download speed via command line.
#
# Usage: netspeed [tokyo, london, usw, use, east, west, URL]
# ^default U.S. west coast.
# [ -speed_KB/sec ]
# ^negation activates the Mbps converter.
#
@rsvp
rsvp / httpstatus
Created August 25, 2011 18:00
httpstatus : bash script to get HTTP response code with optional status message (includes verbose definitions in comment)
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2011-08-25
#
# _______________| httpstatus : get HTTP status code
#
# Usage: httpstatus URL [timeout] [--code or --status] [see 4.]
# ^message with code (default)
# ^code (numeric only)
# ^in secs (default: 3)
# ^URL without "http://" prefix works fine.
@rsvp
rsvp / freqy.sh
Created February 18, 2012 15:43
freqy.sh : sort lines by their frequency count -- a very useful idiom as Linux bash script.
#!/usr/bin/env bash
# bash 3.2.25(1) Ubuntu 7.10 Date : 2012-02-15
#
# _______________| freqy : sort and order lines by frequency of appearance.
#
# Usage: freqy [optional: file(s)]
#
# Notes: Will work in a pipe.
# Does not alter the file(s) themselves.
#
@rsvp
rsvp / bug_free_buddha_comment.py
Created June 20, 2016 19:21
Special comment to minimize bugs in any Python or shell code -- Buddhist ASCII Art
# To minimize bugs, include this comment:
#
#
# _oo0oo_
# o8888888o
# 88" . "88
# (| -_- |)
# 0\ = /0
# ___/`---'\___
# .' \| |// '.
@rsvp
rsvp / telamerica.sh
Created August 16, 2012 15:50
telamerica.sh : look-up North American region / area code within +1 | Linux bash self-contained database
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2012-08-11
#
# _______________| telamerica : look-up North American region / area code.
#
# Usage: telamerica [term]
# ^area code (three digits work best),
# or case-sensitive partial regional name.
#
# Examples: % telamerica Mexico
@rsvp
rsvp / tagscrape.sh
Created July 12, 2012 05:12
tagscrape.sh : scrape content between given html tag. | Linux bash script.
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2012-07-11
#
# _______________| tagscrape : echo content(s) between html tag pair.
#
# Usage: tagscrape [tag] [file/URL]
# # Output will exclude the tag themselves.
# # Default for file is stdin, so pipe will work.
#
# Examples: % tagscrape pre foo.html
@rsvp
rsvp / keywords.sh
Created March 25, 2012 02:33
keywords.sh : extract keywords from text. Useful with freqy.sh for summarization.
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2012-03-13
#
# _______________| keywords : extract keywords from text.
#
# Usage: keywords [file, -x, -] [postproduction]
# # clipboard^ ^stdin (default)
#
# Example: % keywords foo.txt cat
# # or try something like...
@rsvp
rsvp / country.sh
Created January 22, 2012 01:42
country.sh : look-up country name, its ISO code or foreign exchange currency symbol. Necessary data is contained within this Linux bash script, so it's very fast.
#!/usr/bin/env bash
# bash 4.1.5(1) Linux Ubuntu 10.04 Date : 2012-01-15
#
# _______________| country : look-up country ISO code or currency symbol.
#
# Usage: country [term] ["iso"|"fx"]
# where "fx" is foreign exchange,
# "iso" is the default option,
# term is case-insensitive regular expression.
#
@rsvp
rsvp / git-logur
Created January 12, 2018 19:54
git-logur : get log of GitHub repository without cloning. Shell script in bash for git log using GitHub API.
#!/usr/bin/env bash
# bash 4.3.11(1) Linux 3.13.0 git 1.9.1 Date : 2018-01-12
#
# _______________| git-logur : get log of GitHub repo without cloning.
#
# Usage: $ git-logur [username] [repository] [-m|-c|-v]
# # Format defaults to messages -m, else
# # -c for concise text, or -v for verbose json.
# # Concise includes author and committer, with timestamps.
#