Skip to content

Instantly share code, notes, and snippets.

View Codcore's full-sized avatar

Andrej Yaroshuk Codcore

View GitHub Profile
2.5.1 :002 > require 'bundler'
2.5.1 :005 > definition = Bundler::Definition.build("Gemfile", nil, nil)
=> #<Bundler::Definition:0x000055ad3a1f8c08 @unlocking_bundler=nil, @unlocking=false, @dependencies=[<Bundler::Dependency type=:runtime name="bundler-whatsup" requirements=">= 0">, <Bundler::Dependency type=:development name="bundler" requirements="~> 1.16">, <Bundler::Dependency type=:development name="rake" requirements="~> 10.0">, <Bundler::Dependency type=:development name="rspec" requirements="~> 3.0">, <Bundler::Dependency type=:development name="cucumber" requirements=">= 0">, <Bundler::Dependency type=:development name="aruba" requirements=">= 0">, <Bundler::Dependency type=:development name="simplecov" requirements=">= 0">, <Bundler::Dependency type=:development name="json" requirements=">= 0">], @sources=#<Bundler::SourceList:0x000055ad3a1b39c8 @path_sources=[#<Bundler::Source::Gemspec:0x47101246656020 source at `.`>], @git_sources=[], @plugin_sources=[], @global_rubygems_source=nil, @rubygems_ag
Nope, username or password are incorrect !
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Login Page</title>
<style>
/* Basics */
html, body {
width: 100%;
height: 100%;
# require "./rsaccess-web/*"
require "../../src/amethyst"
module Rsaccess::Web
class WordController < Base::Controller
actions :login
view "login", "#{__DIR__}/views"
view "success", "#{__DIR__}/views", username, password
$view = "view"
class View
  def initialize()
    @name = "Andrew"
  end

  ecr_file("#{__DIR__}/#{$view}.ecr")
end
@Codcore
Codcore / gist:cfa0b90da68cebc8a3e4
Created June 8, 2015 13:21
Installing Crystal 0.7.3 Manjaro Linux
Pending:
Code gen: lib codegens lib var set and get
Code gen: primitives codegens pointer of int
Code gen: primitives sums two numbers out of an [] of Number
Code gen: virtual type calls class method 1
Code gen: virtual type calls class method 2
Code gen: virtual type calls class method 3
Type inference: cast casts from union to incompatible union gives error
Type inference: def overload restricts on generic type with free type arg
Type inference: def overload restricts on generic type without type arg
@Codcore
Codcore / gist:0c7a331b69eed542fb78
Last active August 29, 2015 14:22
Amethyst web framework benchmark

Here are result of Amethyst benchmarking with wrk:

./wrk -d 60 -t 10 -c 200 http://127.0.0.1:8080/
Running 1m test @ http://127.0.0.1:8080/
  10 threads and 200 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency     5.24ms  548.04us  16.95ms   85.04%
    Req/Sec     3.83k   223.66     4.42k    82.93%
  2290956 requests in 1.00m, 9.71GB read
Requests/sec: 38157.50