Go to the Resources tab and in the Add-ons section type Heroku Redis in the search field. It will appear in the search list. Click on it and a modal will show up to install it, click in the Provision button to start the installation.
This file contains hidden or 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
| //= require jquery | |
| //= require activestorage | |
| //= require turbolinks | |
| //= require rrt | |
| //= require_tree . | |
| Uncaught ReferenceError: ClipboardJS is not defined |
This file contains hidden or 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
| def flatten_array(array, flattened=[]) | |
| array.each do |element| | |
| if element.kind_of?(Array) | |
| flatten_array(element, flattened) | |
| else | |
| flattened << element | |
| end | |
| end | |
| flattened | |
| end |
This file contains hidden or 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
| AdWidget = { | |
| settings: { | |
| $window: $(window), | |
| ad: $('#div-gpt-ad-boxad-0'), | |
| }, | |
| init: function() { | |
| s = this.settings; | |
| viewTop = s.$window.scrollTop(); | |
| viewBottom = viewTop + s.$window.height(); |
This file contains hidden or 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
| [alias] | |
| copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f" | |
| prunepr = "!git for-each-ref refs/heads/pr-* --format='%(refname:short)' | while read ref ; do git branch -D $ref ; done" | |
| tree = log --pretty=oneline --abbrev-commit --graph --decorate | |
| # Instructions | |
| # 1. add to .gitconfig | |
| # 2. when pulling other people's branch you can use git copr 'pr number' | |
| # e.g git copr 32 // this will pull down the branch |
This file contains hidden or 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
| [alias] | |
| copr = "!f() { git fetch -fu origin refs/pull/$1/head:pr-$1; git checkout pr-$1; } ; f" | |
| prunepr = "!git for-each-ref refs/heads/pr-* --format='%(refname:short)' | while read ref ; do git branch -D $ref ; done" | |
| tree = log --pretty=oneline --abbrev-commit --graph --decorate |
This file contains hidden or 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
| def add_some | |
| 1+1 = 2 | |
| puts "added" | |
| end |
This file contains hidden or 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
| # renders | |
| # { :json => 7 } |
This file contains hidden or 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
| -(void)moveItemAtIndex:(NSUInteger)fromIndex | |
| toIndex:(NSUInteger)toIndex | |
| { | |
| if(fromIndex == toIndex) { | |
| return; | |
| } | |
| BNRItem *item = self.privateItems[fromIndex]; | |
| //Remove item from array |
This file contains hidden or 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
| @number = 0 | |
| print "How much should we add:" | |
| @number + gets.chomp.to_i | |
| puts "> #{@number}" | |
| print "How much should we subtract:" | |
| @number - gets.chomp.to_i | |
| puts "> #{@number}" | |
| print "How much should we multiply:" | |
| @number = gets.chomp.to_i * @number | |
| puts "> #{@number}" |
NewerOlder