function ruby_version()
{
if which rvm-prompt &> /dev/null; then
rvm-prompt i v g
else
if which ruby &> /dev/null; then
ruby -v | sed -E 's/.*ruby ([0-9]+\.[0-9]+\.[0-9]+).*/\1/'
fi
# encoding: UTF-8 | |
require 'optparse' | |
require 'net/http' | |
require 'json' | |
def parse_options(argv) | |
opts = {} | |
@parser = OptionParser.new do |o| |
Unicorn was by far the best performing (5.94 trans/sec over the 1-minute test, 352 total). Puma (3.95 trans/sec, 235 total) appeared to perform no better than Webrick, despite the default behavior of using up to 16 threads. Perhaps increasing its worker count to the number of cores will improve its performance.
I've tried to run multiple Puma workers with the workers
directive (per their sample documentaiton), but I receive errors about undefined method 'workers' for #<Puma::Configuration::DSL:0x007ffca4bde798>
).
$ bundle exec rails server
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Box Shadow</title> | |
<style> | |
.box { | |
height: 150px; | |
width: 300px; | |
margin: 20px; |
There are now two ways to approach this:
- Using gpg and generating keys
- Using Kryptonite by krypt.co
This Gist explains how to do this using gpg in a step-by-step fashion. Kryptonite is actually wickedly easy to use-but you will still need to follow the instructions
For using a GUI-based GIT tool such as Tower or Github Desktop, follow the steps here for signing with either GPG or Krypt.co.
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
# Ruby CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
# | |
defaults: &defaults | |
working_directory: ~/repo | |
docker: | |
- image: circleci/ruby:2.4.1-node-browsers | |
environment: |
//views/SomeComponent/index.js | |
import React from "react"; | |
import { connect } from "react-redux"; | |
import { compose } from "redux"; | |
import reducer, { reducerName as key } from "./reducer"; | |
// import reducerRegistry from "utils/reducerRegistry"; | |
import reducerInjector from "utils/reducerInjector"; | |
function SomeComponent() { | |
const classes = useStyles(); |
I hereby claim:
- I am dthtien on github.
- I am dthtien (https://keybase.io/dthtien) on keybase.
- I have a public key ASAFVpfQFTeq3lXSupt5p-1dWsHzO8bTo5KNoDRkNCPmPQo
To claim this, I am signing this object: