Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ivoarch's full-sized avatar

ivoarch

  • none
View GitHub Profile
#!/usr/bin/env ruby
# coding: utf-8
# ANSI color scheme script
# Original: http://crunchbanglinux.org/forums/post/128584/#p128584
# Modified by Ivo in (Ruby)
0.upto(6).each do |f|
print "\033[#{f+41}m\033[#{f+30}m██▓▒░"
end
puts "\033[37m██"
#!/usr/bin/env ruby
# coding: utf-8
# ANSI color scheme script
# Author: Ivaylo Kuzev <ivkuzev[at]gmail[dot]com>
# Original: http://crunchbanglinux.org/forums/post/134749/#p134749
# Modified using Ruby.
CL = "\e[0m"
BO = "\e[1m"
@ivoarch
ivoarch / prompt.zsh
Last active August 29, 2015 13:59
Minimal 256color prompt for zsh users
# PROMPT - themes for ZSH
# TODO:
# o add git support ?
# Set required options.
setopt promptsubst
local bold="%B"
local unbold="%b"
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
altwin:menu = +altwin(menu)
altwin:meta_alt = +altwin(meta_alt)
altwin:ctrl_win = +altwin(ctrl_win)
altwin:meta_win = +altwin(meta_win)
altwin:left_meta_win = +altwin(left_meta_win)
altwin:super_win = +altwin(super_win)
altwin:hyper_win = +altwin(hyper_win)
altwin:alt_super_win = +altwin(alt_super_win)
altwin:swap_lalt_lwin = +altwin(swap_lalt_lwin)
grp:switch = +group(switch)

Setup Dropbox for system startup

The following instructions will get you setup to run Dropbox at system start. Below, also find instructions on how to install the Dropbox CLI.

# Login as root and go into home dir.
sudo su && cd ~

# Download Dropbox depending on architecture (uname -a) and unpack.
# You will need to repeat this "download and unpack" step for all users
--- NetworkManager.conf.orig 2014-10-26 10:19:18.398880201 +0100
+++ NetworkManager.conf 2014-10-26 09:37:06.646255367 +0100
@@ -12,6 +12,12 @@
<allow send_destination="org.freedesktop.NetworkManager"
send_interface="org.freedesktop.NetworkManager.PPP"/>
</policy>
+ <!-- My hack -->
+ <policy group="network">
+ <allow send_destination="org.freedesktop.NetworkManager"
+ send_interface="org.freedesktop.NetworkManager"/>
@ivoarch
ivoarch / wtime.sh
Last active August 29, 2015 14:08
Световното време от терминала.
#!/bin/bash
# само за bash
shopt -s expand_aliases
clear;
alias datetime="date +'%a-%d-%b,%H:%M'"
echo -e 'Колко е часът във Европа?'
echo -e '==========================='
@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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="keywords" content="">
<meta name="author" content="">
<title>TITLE</title>