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
| <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
| "http://www.w3.org/TR/html4/strict.dtd"> | |
| <html> | |
| <head> | |
| <title></title> | |
| <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
| <style type="text/css"> | |
| td.linenos { background-color: #f0f0f0; padding-right: 10px; } | |
| span.lineno { background-color: #f0f0f0; padding: 0 5px 0 5px; } |
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
| > heroku open -r staging | |
| module.js:557 | |
| throw err; | |
| ^ | |
| Error: Cannot find module '@cli-engine/engine' | |
| at Function.Module._resolveFilename (module.js:555:15) | |
| at Function.Module._load (module.js:482:25) | |
| at Module.require (module.js:604:17) |
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
| find . -name \*.rb -exec perl -p -i -e 's/([^:]):(\w+)\s*=>/\1\2:/g' {} \; |
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
| ### Infura helper class | |
| require "http" | |
| require "json" | |
| class Infura | |
| NETWORK = :mainnet | |
| API_BASE_URL = "https://api.infura.io/v1/jsonrpc/#{Infura::NETWORK}/" | |
| class << self |
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
| vendor/ruby-2.5.0/lib/ruby/2.5.0/monitor.rb:185:in `lock': deadlock; recursive locking (ThreadError) | |
| from vendor/ruby-2.5.0/lib/ruby/2.5.0/monitor.rb:185:in `mon_enter' | |
| from vendor/ruby-2.5.0/lib/ruby/2.5.0/monitor.rb:224:in `mon_synchronize' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/dalli/options.rb:23:in `alive?' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/dalli/ring.rb:42:in `server_for_key' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/dalli/client.rb:361:in `perform' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/dalli/client.rb:181:in `incr' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/active_support/cache/dalli_store.rb:234:in `block (2 levels) in increment' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/dalli/client.rb:262:in `with' | |
| from vendor/bundle/ruby/2.5.0/gems/dalli-2.7.6/lib/active_support/cache/dalli_store.rb:82:in `with' |
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
| defmodule FizzBuzz do | |
| def run do | |
| range = 1..10 | |
| Enum.each range, fn i -> print_eye(i) end | |
| end | |
| def print_eye i do | |
| cond do | |
| rem(i, 3) == 0 -> | |
| IO.puts "Fizz" |
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
| { | |
| "items": [{ | |
| "type": ["h-event"], | |
| "properties": { | |
| "author": [{ | |
| "value": "gRegor Morrill", | |
| "type": ["h-card"], | |
| "properties": { | |
| "photo": ["/assets/img/profile.jpg"], | |
| "name": ["gRegor Morrill"], |
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
| "Calling all. This is our last cry before our eternal silence." | |
| - The 2.X version. | |
| Coming VERY SOON: The 3.0 Version! | |
| 3.0 is a nearly complete re-write of the Microformats Ruby parser. | |
| 3.0 will fix almost all outstanding issues on the GitHub repo, | |
| add classical Microformats support and more! But unfortunately, | |
| the cost of doing this is that there will be some breaking changes | |
| and changing API. |
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
| # In Ruby | |
| # Array.each | |
| # Iterate through each a collection unchanged | |
| User.all.each do |user| | |
| puts user.email | |
| puts user.name | |
| puts | |
| 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
| class Array | |
| def shift | |
| output = self.first | |
| self = self[1..-1] | |
| output | |
| end | |
| def unshift(item) | |
| [item] + self |