Skip to content

Instantly share code, notes, and snippets.

View egel's full-sized avatar

Maciej Sypien egel

View GitHub Profile
@egel
egel / button_inverse_mixins.sass
Created October 18, 2015 14:17
Helper mixins for building sass
@mixin button-inverse-variant($color, $hover-color, $hover-background, $border, $hover-border)
color: $color
background-color: transparent
border-color: $border
&:hover,
&:focus,
&.focus,
&:active,
&.active,
@egel
egel / funny-frogs.sh
Created October 10, 2015 09:39
Funny frogs installer - when run it adds to your .bashrc funny frogs daily phrase.
#!/bin/bash
green='\e[1;32m' # '\e[1;32m' is too bright for white bg.
red='\e[0;31m'
yellow='\e[0;33m'
purple='\e[0;35m'
endColor='\e[0m'
echo -e "${purple}====== Install: cowsay, fortune-mod ======${endColor}"
sudo apt-get install -y cowsay fortune-mod
@egel
egel / bash-improver.sh
Created October 10, 2015 09:36
Bash improver - simple script which add color prompt and man pages, popular aliases, 256 xterm color support, better bash history, and git-prompt (you can find it into my gists)
#!/bin/bash
# Bash Extras - personal configuration
RESET="\[\017\]"
NORMAL="\[\033[00m\]"
GREEN="\[\033[01;32m\]"
PURPLE="\[\033[01;35m\]"
BLUE="\[\033[01;34m\]"
RED="\[\033[31;1m\]"
YELLOW="\[\033[01;33m\]"
@egel
egel / xterm_and_tmux_256_colors.sh
Created October 10, 2015 09:28
Sample configuration installer for 256 color support for your xterm
#!/bin/bash
# Run this program to add 256 color support for your xterm
green='\e[0;32m' # '\e[1;32m' is too bright for white bg.
red='\e[0;31m'
yellow='\e[0;33m'
purple='\e[0;35m'
endColor='\e[0m'
@egel
egel / color_man_pages.sh
Created October 10, 2015 09:25
Bash color man pages
# To work, link this file to your .bashrc file
# Add colors to man pages
export LESS_TERMCAP_mb=$'\E[01;31m' # enter blinking mode
export LESS_TERMCAP_md=$'\E[01;31m' # enter double-bright mode
export LESS_TERMCAP_me=$'\E[0m' # turn off all appearance modes (mb, md, so, us)
export LESS_TERMCAP_se=$'\E[0m' # leave standout mode
export LESS_TERMCAP_so=$'\E[01;44;33m' # enter standout mode – yellow
export LESS_TERMCAP_ue=$'\E[0m' # leave underline mode
export LESS_TERMCAP_us=$'\E[01;32m' # enter underline mode
@egel
egel / git-prompt.sh
Created October 10, 2015 09:11
Bash git prompt (show current git branch in prompt)
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <[email protected]>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
@egel
egel / git-loglive.sh
Last active October 10, 2015 09:12
Bash git loglive (refreshing git repository log)
#!/bin/sh
while true;
do
clear
echo "Git livelog: $(pwd)"
git log \
--graph \
--all \
--abbrev-commit \
--date=relative \
@egel
egel / colors.py
Created October 10, 2015 08:04
Simple python color class
#!/usr/bin/python3
# -*- coding: utf-8 -*-
class Colors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
sudo apt-get install libffi-dev libssl-dev # for python
sudo pip install requests[security]
sudo apt-get install libgtkspell-dev libgtkspell0
sudo apt-get install libdb6.0-* # berkley db
sudo apt-get install libboost-all-dev # boost lib c++
# lucane plus plus lib
git clone https://github.com/luceneplusplus/LucenePlusPlus.git
mkdir LucenePlusPlus/build; cd LucenePlusPlus.build
@egel
egel / mint_software_install.sh
Last active August 30, 2015 11:29
Installing most useful software for Linux Mint 17.2
#!/bin/bash
# General colors
black='\x1B[0;30m'
red='\x1B[0;31m'
green='\x1B[0;32m' # '\x1B[1;32m' is too bright for white bg.
blue='\x1B[1;34m'
yellow='\x1B[0;33m'
purple='\x1B[1;35m'
cyan='\x1B[0;36m'