Skip to content

Instantly share code, notes, and snippets.

View mateuszgachowski-snippets's full-sized avatar

mateuszgachowski-snippets

View GitHub Profile
@mateuszgachowski-snippets
mateuszgachowski-snippets / index.html
Created February 7, 2014 15:45
HTML: Hover element before hack
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="Test">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test table hover</title>
<link rel="stylesheet" href="css/style.css">
<link rel="author" href="humans.txt">
<style>
vim-airline|https://github.com/bling/vim-airline
synastic|https://github.com/scrooloose/syntastic.git
nerdtree|https://github.com/scrooloose/nerdtree.git
ctrlp.vim|https://github.com/kien/ctrlp.vim.git
vim-surround|git://github.com/tpope/vim-surround.git
vim-sensible|git://github.com/tpope/vim-sensible.git
snipmate.vim|https://github.com/msanders/snipmate.vim
vim-startify|https://github.com/mhinz/vim-startify
tagbar|git://github.com/majutsushi/tagbar
vim-fugitive|https://github.com/tpope/vim-fugitive.git
execute pathogen#infect()
" Syntax settings
syntax enable
filetype plugin indent on
set number
set cursorline
highlight LineNr term=bold cterm=NONE ctermfg=White ctermbg=NONE gui=NONE guifg=Black guibg=NONE
highlight CursorLine cterm=NONE ctermbg=Black ctermfg=NONE guibg=NONE guifg=NONE
highlight Pmenu ctermfg=black ctermbg=white
@mateuszgachowski-snippets
mateuszgachowski-snippets / replace.py
Created December 7, 2013 13:09
Python: Script to replace subtitles encoding from windows to UTF (QNapi)
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys, codecs, os
replacements = {
u'¹' : u'ą',
u'³' : u'ł',
u'œ' : u'ś',
u'æ' : u'ć',
@mateuszgachowski-snippets
mateuszgachowski-snippets / itunes.sh
Created December 6, 2013 22:19
Bash: iTunes CLI
#!/bin/sh
#
####################################
# iTunes Command Line Control v1.0
# written by David Schlosnagle
# created 2001.11.08
# @edited Mateusz Gachowski
####################################
showHelp () {
@mateuszgachowski-snippets
mateuszgachowski-snippets / .bash_profile.sh
Created December 4, 2013 18:10
Bash: Sample .bash_profile
# Bash #
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='\[\033[01;32m\]\u@\[\033[01;36m\] \W \[\033[01;33m\]$(parse_git_branch)\[\033[01;34m\] \$\[\033[00m\] '
# Aliases #
alias ls='ls -G -S -F'
alias ..='cd ..'
@mateuszgachowski-snippets
mateuszgachowski-snippets / .profile.sh
Created December 4, 2013 18:08
Bash: Start webserver in current directory
#!/usr/bin/env python
#Python web-server
function webserver() {
open "http://localhost:${1:-8000}" && $(which python) -m SimpleHTTPServer ${1:-8000}
}