Skip to content

Instantly share code, notes, and snippets.

View alekpopovic's full-sized avatar
🏠
Working from home

Aleksandar Popovic alekpopovic

🏠
Working from home
View GitHub Profile
@alekpopovic
alekpopovic / rspec_html.rake
Created January 26, 2016 10:55 — forked from jonahoffline/rspec_html.rake
Rake Task for generating a RSpec report in html.
require 'rspec/core/rake_task'
RSpec::Core::RakeTask.new(:spec) do |t|
t.rspec_opts = '--format html --out reports/rspec_results.html'
end
namespace :rspec_report do
desc 'Run all specs and generate RSpec report in HTML'
task :html => :spec
@alekpopovic
alekpopovic / .travis.yml
Created January 31, 2016 22:27 — forked from douglasduteil/.travis.yml
Here is how I allow Git SSH authentication in Travis CI. I'm using it to connect Travis to my repo organization AngularUI. This trick is a fork. The goal is to encode the RSA private deploy key in the .travis.yml as "-secure: xxxxx.....".
---
language: node_js
node_js:
- '0.10'
branches:
only:
- master
before_script: .travis/before_script.sh
script: echo -e " >>> Do something... \"grunt\" for example\n"
after_success: .travis/after_success.sh
@alekpopovic
alekpopovic / ubuntu-install-ruby-1.8.7.sh
Created February 4, 2016 20:11 — forked from murphyslaw/ubuntu-install-ruby-1.8.7.sh
Install Ruby 1.8.7 with rbenv on Ubuntu
# Install system libraries.
sudo apt-get install zlib1g-dev openssl libssl-dev libreadline-dev git-core
# Install rbenv.
git clone git://github.com/sstephenson/rbenv.git ~/.rbenv
# Setup bash.
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
exec $SHELL
@alekpopovic
alekpopovic / logstash_indexer.conf
Created February 5, 2016 16:02 — forked from fairchild/logstash_indexer.conf
Logstash config example
input {
redis {
host => "127.0.0.1"
type => "redis-input"
# these settings should match the output of the agent
data_type => "list"
key => "logstash"
# We use json_event here since the sender is a logstash agent
message_format => "json_event"
}
@alekpopovic
alekpopovic / README.md
Created February 10, 2016 20:14 — forked from cypriss/README.md
Rails 2.3.14 Ruby 1.9.3 - Monkey Patches

How we upgraded UserVoice, a Rails 2.3.14 app, to Ruby 1.9.3.

Blog post here

@alekpopovic
alekpopovic / curl.md
Created February 23, 2016 00:04 — forked from btoone/curl.md
A curl tutorial using GitHub's API

Introduction

An introduction to curl using GitHub's API

The Basics

Makes a basic GET request to the specifed URI

curl https://api.github.com/users/caspyin
@alekpopovic
alekpopovic / remove-docker-containers.md
Created March 1, 2016 09:46 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
@alekpopovic
alekpopovic / Sublime Text License Key
Created March 2, 2016 11:39
Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version.
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version
Go to menu Help > Enter License.
----- BEGIN LICENSE -----
J2TeaM
2 User License
EA7E-940282
45CB0D8F 09100037 7D1056EB A1DDC1A2
@alekpopovic
alekpopovic / Procfile.development
Created March 12, 2016 12:35 — forked from madhums/Procfile.development
foreman and thinking sphinx
sphinx: bundle exec rake thinking_sphinx:run_in_foreground RAILS_ENV=development --trace
# This is an example for a rails app to share model content to facebook and twitter with a scheduler and delayed_job_active_record
# My main model is called quote.rb
# Gemfile
gem 'omniauth-twitter', '~> 1.2'
gem 'omniauth-facebook', '~> 3.0'
gem 'validates_timeliness', '~> 4.0'
gem 'twitter', '~> 5.15'
gem 'koala', '~> 2.2'