rbenv/ruby-build don’t use Homebrew-installed versions of OpenSSL — instead, they on OS X's built-in ancient version.
This can throw OpenSSL::SSL::SSLError
s when talking to websites that enforce newer SSL/TLS protocols and ciphersuites.
# [] - Eqauls to | |
# ^ - Not equals to | |
# =~ - LIKE | |
# >, >=, <, <= works as expected | |
# | |
# Examples : | |
# | |
# Item.where(:colour['Red'], :quanity > 10, :price <= 200) | |
# Post.where(:comments_count >= 1, :taggings_count < 5) | |
# User.where(:country ^ 'US') # Non american users |
# -*- coding: utf-8 -*- | |
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
# custom rake tasks | |
require '../raketasks/gemerator.rb' | |
desc "Open latest crash log" | |
task :log do | |
app = Motion::Project::App.config |
#!/usr/bin/env ruby | |
def get_values(string, expression) | |
regex = Regexp.new(expression.gsub(/\{([^\}]+)\}/) { "(?<#{$1}>\\S+)" }) | |
(match = regex.match(string)) ? Hash[match.names.zip(match.captures)] : {} | |
end | |
p get_values "Alice is 23 years old", "{name} is {age} years old" #=> {"name"=>"Alice", "age"=>"23"} |
require 'gherkin/parser/parser' | |
require 'gherkin/formatter/json_formatter' | |
require 'stringio' | |
require "active_support/core_ext/hash/conversions" | |
require 'nokogiri' | |
class XMLFormatter < Gherkin::Formatter::JSONFormatter | |
def done | |
@io.write(@feature_hashes.to_xml) | |
end |
rbenv/ruby-build don’t use Homebrew-installed versions of OpenSSL — instead, they on OS X's built-in ancient version.
This can throw OpenSSL::SSL::SSLError
s when talking to websites that enforce newer SSL/TLS protocols and ciphersuites.
class Entity | |
include DataMapper::Resource | |
property :enum_property, Enum[:a, :b, :c] | |
end | |
Entity.enum_property.options[:flags] #=> [:a, :b, :c] | |
# or | |
Entity.enum_property.flag_option.values #=> [:a, :b, :c] |
<IfModule mod_fastcgi.c> | |
AddHandler fastcgi-script .fcgi | |
</IfModule> | |
<IfModule mod_fcgid.c> | |
AddHandler fcgid-script .fcgi | |
</IfModule> | |
Options +FollowSymLinks +ExecCGI | |
RewriteEngine On |
// ==UserScript== | |
// @name webWincPartnernetChart | |
// @namespace webWinc | |
// @include https://partnernet.amazon.de/* | |
// @version 1 | |
// @grant GM_setValue | |
// @grant GM_getValue | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js | |
// @require https://code.highcharts.com/stock/highstock.js | |
// ==/UserScript== |
Was asked to look at this thing again; only reviewed the JS portion. Last I checked, the CSS was similarly reality-challenged. Graphics are nice, but are tantamount to the paint job on a used car. Under the hood, this thing is all junk. It's hard to imagine the innards of any Web or mobile device-based application would end up like this, which raises the question of whether the authors have ever written such applications (or any amount of meaningful JS).
/**
* @class Ext
* @singleton
There (still) are no "classes" or "singletons" in JS (starting off on the wrong foot by mangling JS terms).
import SwiftUI | |
struct MapView: UIViewRepresentable { | |
var coordinate: CLLocationCoordinate2D | |
func makeUIView(context: Context) -> MKMapView { | |
MKMapView(frame: .zero) | |
} | |
func updateUIView(_ view: MKMapView, context: Context) { |