Skip to content

Instantly share code, notes, and snippets.

View ivoarch's full-sized avatar

ivoarch

  • none
View GitHub Profile
#!/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
@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.

@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 / 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 / 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 / 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 / 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 - Изпълни команда след определено време на застой"
--- exmplayer-orig.spec 2015-04-04 18:02:19.173215364 +0200
+++ exmplayer.spec 2015-03-20 13:31:32.000000000 +0100
@@ -3,17 +3,17 @@
Name: exmplayer
Version: 3.8.0
-Release: 1%{?dist}
-Summary: MPlayer GUI with thumbnail seeking, 3D Video support,
+Release: 2%{?dist}.sos
+Summary: MPlayer GUI with thumbnail seeking and 3D Video support.
diff -Nru ExMplayer-orig/src/playerwindow.ui ExMplayer/src/playerwindow.ui
--- ExMplayer-orig/src/playerwindow.ui 2014-02-01 08:29:44.000000000 +0100
+++ ExMplayer/src/playerwindow.ui 2015-03-20 12:55:24.386708044 +0100
@@ -2908,7 +2908,7 @@
<property name="maxLength">
<number>32766</number>
</property>
- <property name="placeholderText">
+ <property name="text">
<string>Enter command</string>
@ivoarch
ivoarch / png2svg.sh
Last active August 29, 2015 14:28 — forked from ykarikos/png2svg.sh
Convert png to svg using imagemagick and potrace
#!/bin/bash
if [ "$1" == "" ]; then
echo Usage: $0 pngfile
exit 0;
fi
FILE=`basename $1 .png`
if [ ! -e $FILE.png ]; then