This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="h-full"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<!-- ios thumbnail --> | |
<link rel="apple-touch-icon" sizes="180x180" href="https://user-images.githubusercontent.com/9228/236164238-103513de-300c-4e15-8141-762876b37c96.jpg" /> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Knjiga – Drago Rudel: Moja pot po Caminu francés</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="apple-touch-icon" href="https://user-images.githubusercontent.com/9228/91032481-4890e580-e602-11ea-94b8-fdedf4ba0414.png"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Ivan Kapetanović - Camino</title> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="apple-touch-icon" href="https://user-images.githubusercontent.com/9228/60210452-30d29b80-985d-11e9-8286-300d785ada63.png"> | |
</head> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this script to collection's pre-request scripts | |
// Collection -> Edit -> Pre-request Scripts | |
// Automatically fetch oAuth access_token and store it for 1 hour | |
update_token = pm.environment.get("token_time"); | |
if (typeof(update_token) == "undefined" || update_token <= Date.now()) { | |
console.log("Fetching new oAuth access token for user"); | |
pm.sendRequest({ | |
url: pm.environment.get("host") + pm.environment.get("token_path"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
parseFrameURL should point to this document. | |
Once the form is submitted it will: | |
- redirect to passwordResetSuccess if everything goes well | |
- redirect to invalidLink if data is invalid (eg. missing or invalid token, wrong email) | |
--> | |
<html> | |
<head></head> | |
<body> | |
<h1>Reset Your Password<span id='app'></span></h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source by @Abs (http://stackoverflow.com/a/26855101) | |
module SoftDeletable | |
extend ActiveSupport::Concern | |
included do | |
default_scope { where(is_deleted: false) } | |
scope :only_deleted, -> { unscope(where: :is_deleted).where(is_deleted: true) } | |
end | |
def delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RSpec is absolutely flexible tool. One of its multitarget features is metadata. The main purpose of this feature is filtering and groupping examples by given attributes. You can found a lot of examples in article “Filtering examples in rspec-2”. | |
Recently I was faced with the need to test application behaviour depending on current subdomain. It was a group of examples so I need to use filters. Spec was similar to script below: | |
```ruby | |
feature "On custom subdomain", :subdomain => 'custom' do | |
scenario "homepage should change colorscheme to blue and use custom logo" do | |
... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using [parity](https://github.com/thoughtbot/parity) | |
development restore production | |
development restore staging | |
# Steps for manual backup | |
heroku pg:backups capture --remote production | |
curl `heroku pg:backups public-url --remote production` > tmp/db.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/application.rb | |
require File.expand_path('../boot', __FILE__) | |
require 'rails/all' | |
require File.dirname(__FILE__) + '/../lib/silent_logger.rb' | |
# Require the gems listed in Gemfile, including any gems | |
# you've limited to :test, :development, or :production. | |
Bundler.require(:default, Rails.env) |
NewerOlder