Skip to content

Instantly share code, notes, and snippets.

View tmvst's full-sized avatar
👾

Tomas Vestenicky tmvst

👾
View GitHub Profile
/* Global styles and overrides */
body {
font-family: Graphik, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
background-image: url('https://d2x2losda9vsjs.cloudfront.net/docs/assets/2019/docs-brush-top.png'), url('https://d2x2losda9vsjs.cloudfront.net/docs/assets/2019/docs-brush-bottom.png');
background-repeat: no-repeat, no-repeat;
background-position: 0 700px, 100% 90%;
background-size: 350px 350px, 350px 350px;
background-color: #FAFAFA;
@tmvst
tmvst / tf.rb
Created April 10, 2014 07:33
Term frequency rake task
Document.all.each do |doc|
processor = FulltextProcessor.where(:document_id => doc.id, :status => Processor::StatusHelper::PROCESSED).last
if processor.present? && processor.get_data.present?
#puts "Doc #{doc.id} ma fulltext #{processor.get_data}"
stemmed = Text::TextProcessor.stem_text(processor.get_data).join(' ')
l = stemmed.scan(/and/).length
if l<0
puts "#{processor.get_data}"
puts "-----------------------------------------------"
puts "------ ma #{l} vyskytov -and-"
@tmvst
tmvst / .bash-profile
Created September 28, 2013 09:03
Sexy bash
alias l="ls -la"
alias ..="cd ../"
alias c="clear"
# Sexy Bash Prompt, inspired by "Extravagant Zsh Prompt"
# Screenshot: http://i.imgur.com/uAQSa.png
# A big thanks to \amethyst on Freenode
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then TERM=gnome-256color; fi
if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then
@tmvst
tmvst / rakes
Created September 20, 2013 16:48
Rake db tasks
for rails 3.2.12:
I just checked the source and the dependencies are like this now:
db:create creates the database for the current env
db:create:all creates the databases for all envs
db:drop drops the database for the current env
db:drop:all drops the databases for all envs
db:migrate runs migrations for the current env that have not run yet
db:migrate:up runs one specific migration
@tmvst
tmvst / pymac
Created July 15, 2013 12:19
Instalacia Python 3 a Pyramid 1.4 na Mountain Lion
brew install python3
curl -O http://python-distribute.org/distribute_setup.py
sudo python3 distribute_setup.py
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
sudo python3 get-pip.py
# .bash_profile
export PATH=/Library/Frameworks/Python.framework/Versions/3.3/bin:$PATH