Skip to content

Instantly share code, notes, and snippets.

View dminchev's full-sized avatar

Dobromir Minchev dminchev

View GitHub Profile

Install minio

brew install minio
vim /usr/local/etc/minio/config.json
{
 "version": "20",
@dminchev
dminchev / nginx.conf
Created August 3, 2017 09:07 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@dminchev
dminchev / engine.md
Last active October 24, 2023 14:53
Init rails engine with rspec

Init the engine

rails plugin new engine_name --dummy-path=spec/dummy --skip-test-unit --mountable --database=postgresql

Add dependecies to the gemspec

s.add_development_dependency 'rspec-rails'
s.add_development_dependency 'capybara'
s.add_development_dependency 'factory_girl_rails'
@dminchev
dminchev / setup.md
Created November 11, 2015 11:20
setup server

adduser deploy
ssh-copy-id -i ~/.ssh/deploy.pub deploy@example.com

Install rbenv

aptitude install git

override func viewDidLoad() {
super.viewDidLoad()
// Do any additional setup after loading the view, typically from a nib.
var appDel:AppDelegate = UIApplication.sharedApplication().delegate as AppDelegate
var context:NSManagedObjectContext = appDel.managedObjectContext!
/*
var newUser = NSEntityDescription.insertNewObjectForEntityForName("Users", inManagedObjectContext: context) as NSManagedObject
newUser.setValue("Rob", forKey: "username")
@dminchev
dminchev / Sublime Text 2 Packages
Created February 8, 2013 09:14
Sublime Text 2 Packages
https://github.com/tadast/sublime-rails-snippets
https://github.com/elomarns/auto-encoding-for-ruby
https://github.com/CraigWilliams/BeautifyRuby
https://github.com/luqman/SublimeText2RailsRelatedFiles
https://github.com/kuroir/SCSS.tmbundle
https://github.com/phuibonhoa/handcrafted-haml-textmate-bundle
https://github.com/pavelpachkovskij/sublime-html-to-haml
http://xavura.github.com/CoffeeScript-Sublime-Plugin/
namespace :deploy do
namespace :assets do
desc 'Run the precompile task locally and rsync with shared'
task :precompile, :roles => :web, :except => { :no_release => true } do
%x{bundle exec rake assets:precompile}
%x{rsync --recursive --times --rsh=ssh --compress --human-readable --progress public/assets #{user}@#{location}:#{shared_path}}
%x{bundle exec rake assets:clean}
end
end
task :start do ; end