Skip to content

Instantly share code, notes, and snippets.

View ivoarch's full-sized avatar

ivoarch

  • none
View GitHub Profile
@ivoarch
ivoarch / runafteridle.sh
Last active August 29, 2015 14:17
Изпълни команда след определено време на застой
#!/bin/env bash
# runafteridle.sh
TIME=$1
COMMAND=$2
LOGFILE="${HOME}/.runafteridle.log"
usage() {
echo ""
echo "$0 - Изпълни команда след определено време на застой"
# How to sign your custom RPM package with GPG key
# Step: 1
# Generate gpg key pair (public key and private key)
#
# You will be prompted with a series of questions about encryption.
# Simply select the default values presented. You will also be asked
# to create a Real Name, Email Address and Comment (comment optional).
#
# If you get the following response:
@ivoarch
ivoarch / PKGBUILD
Last active August 29, 2015 14:14
konzolno-radio
# $Id: pkgbuild-mode.el,v 1.23 2007/10/20 16:02:14 juergen Exp $
# Maintainer: <ivo@arch>
pkgname=konzolno-radio
pkgver=1.0.9
pkgrel=1
pkgdesc="Console internet radio to listen to Bulgarian radio stations online in GNU/Linux"
arch=('any')
url="https://github.com/ivoarch/konzolno-radio"
license=('MIT')
depends=('bash' 'mplayer')
@ivoarch
ivoarch / konzolna-alarma.sh
Last active August 29, 2015 14:13
Конзолна аларма използвайки mplayer.
#!/bin/env bash
# Конзолна аларма използвайки mplayer.
PROG="${0##*/}"
VERSION="0.1"
BANNER="${PROG} ${VERSION}"
red=$'\e[0;31m'
green=$'\e[0;32m'
ylw=$'\e[0;33m'
@ivoarch
ivoarch / xmas.sh
Created December 26, 2014 13:52
Брояч на дните до Коледа!!
#!/bin/bash
# Брояч на дните до Коледа!!
#
# Зависимости:
# - bash
# - notify-send
# - xsnow
TODAY="$(date +%j)"
XMAS="$(date -d "25-Dec" +%j)"
@ivoarch
ivoarch / rpmls.sh
Last active August 29, 2015 14:11
List RPM package contents
#!/usr/bin/env bash
# Author: @ivoarch
OPT="$1"
PACKAGE="$2"
usage() {
echo ""
echo "$0 - list RPM package contents"
echo ""
@ivoarch
ivoarch / TrueColor.md
Last active August 29, 2015 14:11 — forked from XVilka/TrueColour.md

Colors in terminal

It's a common confusion about terminal colors... Actually we have this:

  • plain ascii
  • ansi escape codes (16 color codes with bold/italic and background)
  • 256 color palette (216 colors+16gray + ansi) (colors are 24bit)
  • 24bit true color (888 colors (aka 16 milion))

The 256 color palete is configured at start, and it's a 666 cube of colors, each of them defined as a 24bit (888 rgb) color.

#!/bin/bash
arch=$(uname -m)
if [ "$arch" == "x86_64" ]; then
pushd /usr/lib64/firefox/langpacks
else
pushd /usr/lib/firefox/langpacks
fi
unzip langpack-bg@firefox.mozilla.org.xpi install.rdf >/dev/null
sed -i '/./,$!d' install.rdf
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<title>TITLE</title>
@ivoarch
ivoarch / install_firefox-i18n.sh
Last active August 29, 2015 14:08
Install any version of Firefox browser with your language pack (on Linux) so fast.
#!/bin/bash
# Install any version of Firefox browser with your language pack (on Linux) so fast.
# Autor: Ivaylo Kuzev (@ivoarch) 2014
# Init
if [ ! $# -eq 2 ]; then
echo "usage: sudo $0 version locale"
echo "example: sudo $0 31.2.0esr bg"
exit 1;
fi