That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:
Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):
| require "active_record" | |
| namespace :db do | |
| db_config = YAML::load(File.open('config/database.yml')) | |
| db_config_admin = db_config.merge({'database' => 'postgres', 'schema_search_path' => 'public'}) | |
| desc "Create the database" | |
| task :create do | |
| ActiveRecord::Base.establish_connection(db_config_admin) |
| function createStore(reducer) { | |
| const store = { | |
| state: {}, | |
| reducer, | |
| dispatch(action) { | |
| this.state = this.reducer(action, this.state) | |
| } | |
| } | |
| store.dispatch({}) |
That is is basically a "fork" of blog article i'm constantly returning to. It seems that the blog is down:
Dave Bass proposed this which I picked up for my implementation (here for an 8-chars token):
| def fizz_buzz_1(max) | |
| arr = [] | |
| (1..max).each do |n| | |
| if ((n % 3 == 0) && (n % 5 == 0)) | |
| arr << "FizzBuzz" | |
| elsif (n % 3 == 0) | |
| arr << "Fizz" | |
| elsif (n % 5 == 0) | |
| arr << "Buzz" | |
| else |
| RSpec.configure do |config| | |
| config.before(:all, &:silence_output) | |
| config.after(:all, &:enable_output) | |
| end | |
| # Redirects stderr and stdout to /dev/null. | |
| def silence_output | |
| @orig_stderr = $stderr | |
| @orig_stdout = $stdout |
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
| // Note: You must restart bin/webpack-watcher for changes to take effect | |
| var path = require('path') | |
| var webpack = require('webpack') | |
| var merge = require('webpack-merge') | |
| var config = require('./shared.js') | |
| var devconfig = { | |
| devtool: 'sourcemap', |
| // Note: You must restart bin/webpack-watcher for changes to take effect | |
| var path = require('path') | |
| var webpack = require('webpack') | |
| var merge = require('webpack-merge') | |
| var config = require('./shared.js') | |
| var devconfig = { | |
| devtool: 'sourcemap', |