Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
# Disallow everything. | |
User-agent: * | |
Disallow: / | |
# Certain social media sites are whitelisted to allow crawlers to access page markup when links to /images are shared. | |
User-agent: Twitterbot | |
Allow: /images | |
User-agent: facebookexternalhit | |
Allow: /images |
Following instructions from the excellent https://www.rinkeby.io/
A full node lets you access all state. There is a light node (state-on-demand) and wallet-only (no state) instructions as well,
#!/bin/bash | |
if [[ "$1" != "" ]]; then | |
S3BUCKETNAME="$1" | |
else | |
echo ERROR: Failed to supply S3 bucket name | |
exit 1 | |
fi | |
aws s3 sync build s3://$S3BUCKETNAME --delete --cache-control max-age=31536000,public |
mkdir ~/vim | |
cd ~/vim | |
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim | |
# Compiled on Jul 20 2017 | |
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz | |
export VIMRUNTIME="$HOME/vim/runtime" | |
export PATH="$HOME/vim:$PATH" | |
cd - |
After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn't work. | |
The error was "The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0." | |
Database files have to be updated before starting the server, here are the steps that had to be followed: | |
# need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default | |
brew unlink postgresql | |
brew install [email protected] | |
brew unlink [email protected] | |
brew link postgresql |
#!/bin/bash | |
# Exit on error or unset variable. | |
set -e | |
set -u | |
source .env | |
# TODO: Find a builtin way to do this. | |
function urldecode() { |
# spec/rails_helper.rb | |
if ENV['SAVE_SCREENSHOTS'] | |
module CapybaraElementExtensions | |
INTERACTION_METHODS = %i[set select_option unselect_option click | |
right_click double_click send_keys hover trigger drag_to execute_script | |
evaluate_script evaluate_async_script] | |
INTERACTION_METHODS.each do |method| | |
define_method method do |*args, &block| |
import Service, { inject as service } from '@ember/service'; | |
export default Service.extend({ | |
ajax: service(), | |
store: service(), | |
fastboot: service(), | |
client: null, | |
init() { |
class User < ApplicationRecord | |
has_many :order_items_bought, | |
-> { joins(:order).where.not(orders: { state: :expired }).order(created_at: :desc) }, | |
foreign_key: :buyer_id, | |
class_name: :OrderItem | |
has_many :videos_bought, | |
-> { joins(:orders).select('DISTINCT ON (videos.id) videos.*').reorder('videos.id DESC') }, | |
through: :order_items_bought, | |
source: :item, |
import Service, { inject as service } from '@ember/service'; | |
import { computed } from '@ember/object'; | |
import { alias } from '@ember/object/computed'; | |
export default Service.extend({ | |
store: service(), | |
session: service(), | |
auth: alias('session.data.authenticated'), |