Skip to content

Instantly share code, notes, and snippets.

@an-tk
an-tk / .gitignore
Created October 20, 2017 12:47 — forked from WattsInABox/.gitignore
Generate Static HTML Website Using Ruby on Rails
# Ignore static version of the site (used to upload error pages to S3 for Heroku errors)
/out
Go to Run/Debug Configurations
Add a new Gem Command
Enter 'sidekiq' as the Gem name and Executable name
Check 'Run the script in the contexst of bundle (bundle exec) under the 'Bundler' tab
Click 'Apply' and then run it.
@an-tk
an-tk / gist:e7435ccc220b554d42ae
Created January 4, 2016 15:02
log Angular errors with Rollbar
angular.module('app').config(function($provide) {
$provide.decorator('$exceptionHandler', ['$delegate', '$injector', function($delegate, $injector) {
var $location;
return function(exception, cause) {
$location = $location || $injector.get('$location');
var url = $location.absUrl();
$delegate(exception, cause);
Rollbar.error( url + ': ' + exception.stack);
};
}]);
@an-tk
an-tk / deploy.md
Created October 8, 2015 11:40 — forked from websumy/deploy.md
How to deploy rails app to digitalocean with nginx, unicorn, capistrano & postgres

Deploy Rails app to digitalocean with nginx, unicorn, capistrano & postgres

Server setup

Create droplet of your liking (ubuntu 14.04 x64)

ssh to root in terminal with your server ip

ssh root@123.123.123.123