Skip to content

Instantly share code, notes, and snippets.

🎣
Gone fishing

Krasimir Angelov krasio

Block or report user

Report or block krasio

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:a07c91f46c29a10f696ddee309e449a5
Steps to recreate http://blog.codingspree.net/posts/learning-bosh-deploying-web-application/
# In your BUCC folder:
bucc $ bin/bucc up
bucc $ bin/bucc env > bucc.env
bucc $ source bucc.env
bucc $ bosh update-cloud-config ~/projects/bucc/src/bosh-deployment/warden/cloud-config.yml
bucc $ bosh upload-stemcell --sha1 9190e1d20dcb937e007abbb4054e19b1daa8d0a4 \
https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-xenial-go_agent?v=170.14
View gist:f3e1cd072be3fc024b373e555b7af61b
# In your BUCC folder:
bucc $ bin/bucc up
bucc $ bin/bucc env > bucc.env
bucc $ source bucc.env
bucc $ bosh update-cloud-config ~/projects/bucc/src/bosh-deployment/warden/cloud-config.yml
bucc $ bosh upload-stemcell --sha1 9190e1d20dcb937e007abbb4054e19b1daa8d0a4 \
https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-xenial-go_agent?v=170.14
$ git clone https://github.com/krasio/akoranga-nginx-boshrelease.git
$ cd akoranga-nginx-boshrelease
View gist:eddc4b17795fc5be80f1caa500a1052c
$ bucc up
Using flags: --cpi virtualbox --lite
Flag files: '/Users/qrasio/projects/bucc/state/{cpi,lite,flags}'
Deployment manifest: '/Users/qrasio/projects/bucc/src/bosh-deployment/bosh.yml'
Deployment state: '/Users/qrasio/projects/bucc/state/state.json'
Started validating
Downloading release 'bosh'... Skipped [Found in local cache] (00:00:00)
Validating release 'bosh'... Finished (00:00:00)
@krasio
krasio / poolboy_demo.ex
Created Mar 18, 2016 — forked from henrik/poolboy_demo.ex
Example of using Poolboy in Elixir to limit concurrency (e.g. of HTTP requests).
View poolboy_demo.ex
defmodule HttpRequester do
use GenServer
def start_link(_) do
GenServer.start_link(__MODULE__, nil, [])
end
def fetch(server, url) do
# Don't use cast: http://blog.elixirsips.com/2014/07/16/errata-dont-use-cast-in-a-poolboy-transaction/
timeout_ms = 10_000
View tclient.rb
#!/usr/bin/env ruby
require 'socket'
test_file = ARGV[0]
socket = UNIXSocket.new('testing.sock')
socket.write(test_file)
socket.close_write
View .gitconfig
[alias]
tree = log --all --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset %Cblue%an%Creset' --abbrev-commit --date=relative
@krasio
krasio / custom.conf.erb
Created Oct 30, 2012
Simple Chef recipe to customize Nginx configuration on Engine Yard App Cloud
View custom.conf.erb
# cookbooks/nginx-custom/templates/default/custom.conf.erb
rewrite ^/members/(.*)/blog_entries/(.*)$ /members/$1/blog/$2 permanent;
@krasio
krasio / redis_on_passenger.rb
Created Jul 24, 2012
config/initializers/redis_on_passenger.rb
View redis_on_passenger.rb
# config/initializers/redis_on_passenger.rb
if defined?(PhusionPassenger)
PhusionPassenger.on_event(:starting_worker_process) do |forked|
# We're in smart spawning mode.
if forked
# Re-establish redis connection
# disconnect
Resque.redis.client.disconnect
@krasio
krasio / rspec.rake
Created Apr 26, 2012
lib/tasks/rspec.rake
View rspec.rake
require 'rake'
require 'rspec/core/rake_task'
task :noop do; end
spec_prereq = Rails.configuration.generators.options[:rails][:orm] == :active_record ? "db:test:prepare" : :noop
namespace :spec do
RSpec::Core::RakeTask.new(:lite) do |t|
t.pattern = "spec/{models,presenters}/**/*_spec.rb"
end
You can’t perform that action at this time.