├── bin
│ └── console
├── config
│ └── evil_martians_api.yml
├── lib
│ ├── evil_martians_api
│ │ ├── api
│ │ │ └── developers.rb
│ │ ├── client
# frozen_string_literal: true | |
# A VCR trick to include preparation and cleanup phases for external services | |
# directly within the test files (the phases run ONLY when recording cassettes): | |
# | |
# RSpec.describe EvilMartiansAPI::Client, vcr: true do | |
# let(:client) { described_class.new } | |
# | |
# let(:developer_team_number) { 42 } | |
# |
If your running a x64 bit Ubuntu or other Linux and find USB transfers hang at the end apply this fix:
echo $((16*1024*1024)) > /proc/sys/vm/dirty_background_bytes
echo $((48*1024*1024)) > /proc/sys/vm/dirty_bytes
I suggest you edit your /etc/rc.local
file to make this change persistant across reboots.
sudo nano /etc/rc.local
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: example | |
namespace: default | |
data: | |
APPLICATION_HOST: example.com | |
LANG: en_US.UTF-8 | |
PIDFILE: /tmp/server.pid | |
PORT: "3000" |
•100% [I] ➜ rvm get master && rvm list known | |
Downloading https://get.rvm.io | |
Downloading https://raw.githubusercontent.com/rvm/rvm/master/binscripts/rvm-installer.asc | |
Verifying /Users/jpowell/.rvm/archives/rvm-installer.asc | |
gpg: Signature made Sat Sep 9 15:49:18 2017 EDT | |
gpg: using RSA key E206C29FBF04FF17 | |
gpg: Good signature from "Michal Papis (RVM signing) <[email protected]>" [unknown] | |
gpg: Note: This key has expired! | |
Primary key fingerprint: 409B 6B17 96C2 7546 2A17 0311 3804 BB82 D39D C0E3 | |
Subkey fingerprint: 62C9 E5F4 DA30 0D94 AC36 166B E206 C29F BF04 FF17 |
module FactoryGirl | |
module Doctor | |
module FloatDuration | |
refine Float do | |
def duration | |
t = self | |
format("%02d:%02d.%03d", t / 60, t % 60, t.modulo(1) * 1000) | |
end | |
end | |
end |
require 'mechanize' | |
require 'pry' | |
L = 'https://www.facebook.com/v2.6/dialog/oauth?redirect_uri=fb464891386855067%3A%2F%2Fau' \ | |
'thorize%2F&scope=user_birthday,user_photos,user_education_history,email,user_relatio' \ | |
'nship_details,user_friends,user_work_history,user_likes&response_type=token%2Csigned' \ | |
'_request&client_id=464891386855067'.freeze | |
USER_AGENT = 'Mozilla/5.0 (Linux; U; en-gb; KFTHWI Build/JDQ39) AppleWebKit/535.19 (KHTML' \ | |
', like Gecko) Silk/3.16 Safari/535.19'.freeze |
Please star ⭐️ the gist to help! This is a proposal for a ⚡️ talk at Reactive Conference.
I wrote react-toolbox and presented it almost a year ago in lighning talk at Reactive Conf 2015 in Bratislava. At first it was just a proof of concept of a component library styled with CSS Modules and SASS. Now the project has grown quite a bit, and during this year there has been tons of changes and lessons learned.
Theming and customization is one of the most difficult and interesting problems to solve. For the first version we needed a custom Webpack loader to generate themes and doing simple style overrides was very painful. Today I'm working on a new playground that will allow you try CSS Modules live, and to create React Toolbox themes on the f
# Assumes the database container is named 'db' | |
DOCKER_DB_NAME="$(docker-compose ps -q db)" | |
DB_HOSTNAME=db | |
DB_USER=postgres | |
LOCAL_DUMP_PATH="path/to/local.dump" | |
docker-compose up -d db | |
docker exec -i "${DOCKER_DB_NAME}" pg_restore -C --clean --no-acl --no-owner -U "${DB_USER}" -d "${DB_HOSTNAME}" < "${LOCAL_DUMP_PATH}" | |
docker-compose stop db |