Skip to content

Instantly share code, notes, and snippets.

View antono's full-sized avatar
Focusing

Antono Vasiljev antono

Focusing
View GitHub Profile
group :linux do
gem "rb-inotify"
gem "libnotify"
gem "foreman"
gem "mailcatcher"
end
@antono
antono / clojure api for google+.clj
Created October 24, 2011 23:48 — forked from anonymous/clojure api for google+.clj
clojure api for google+
(filter
(fn [user]
(let [langs-of-posts (map google.translate/guess-language
(google.plus/get-user-posts user))]
(and
(pos? (count langs-of-posts))
(every? #(#{:be :en :eo :ja :ru :uk} %) langs-of-posts)) ))
(google.plus/select-users-by-cirle "esperanto"))
@antono
antono / gist:1139683
Created August 11, 2011 13:41
vim keys for speedbar
(add-hook 'speedbar-reconfigure-keymaps-hook
'(lambda ()
(define-key speedbar-key-map (kbd "u") 'speedbar-up-directory)
(define-key speedbar-key-map (kbd "o") 'speedbar-toggle-line-expansion)
(define-key speedbar-key-map (kbd "i") 'speedbar-item-info)
(define-key speedbar-key-map (kbd "r") 'speedbar-refresh)
(define-key speedbar-key-map (kbd "j") 'speedbar-next)
(define-key speedbar-key-map (kbd "k") 'speedbar-prev)
))
;;; starter-kit-elpa.el --- Install a base set of packages automatically.
;;
;; Part of the Emacs Starter Kit
(require 'cl)
(defvar starter-kit-packages (list 'ruby-mode
'inf-ruby
'css-mode
'yaml-mode
trololo
@antono
antono / pg-wtf
Created November 11, 2010 08:53
snippet for monitoring running queries in postgresql
watch 'echo "select datid, datname, procpid, usename, current_query from pg_stat_activity" | psql'
Failures:
1) Bundler::GemHelper tasks gem management release releases
Failure/Error: @helper.release_gem
# ./lib/bundler/gem_helper.rb:132:in `sh'
# ./lib/bundler/gem_helper.rb:101:in `clean?'
# ./lib/bundler/gem_helper.rb:97:in `guard_clean'
# ./lib/bundler/gem_helper.rb:60:in `release_gem'
# ./spec/other/gem_helper_spec.rb:112:in `block (4 levels) in <top (required)>'
2) bundle install with gem sources when locked and installed with --without regenerates the environment.rb if install is called twice on a locked repo
# Add :gemcutter as a source that Bundler will use
# to find gems listed in the manifest. At least one source
# should be listed. URLs maybe also be used, such as
# http://gems.github.com.
source :gemcutter
gem 'bundler', '0.9.7'
gem 'rails', '2.3.5', :require => nil
Factory.define :post, :parent => :discussion, :class => Post do |f|
f.title "This is project post"
f.body "Project will be build fast"
f.creator {|c| c.association(:user)}
f.blog {|b| b.association(:project)}
end
@antono
antono / adiumxtra-install
Created September 22, 2009 22:27
Adium theme installer for Empathy
#!/bin/sh
# Adium theme AdiumMessageStyle installer for Empathy
# Originally © 2009 Antono Vasiljev
# Licensed under the same terms as Empathy
# http://antono.info/en/165-install-adium-themes-to-empathy
# Changed by Vertlo Oraerk (did not work with directories containing spaces in the names)
if [ -z $1 ]
then
echo