Skip to content

Instantly share code, notes, and snippets.

View myabc's full-sized avatar

Alexander Brandon Coles myabc

  • @opf OpenProject
  • London, England
View GitHub Profile
CapybaraAccessibleSelectors::DriverNodeExtensions.class_eval do
def accessible_name
result = browser.page.command("Accessibility.queryAXTree", nodeId: node.node_id)
first_node = result["nodes"]&.first { it["ignored"] == false }
first_node&.dig("name", "value") || ""
end
end
DynamicFormComponent
✓ should create (6ms)
ERROR LOG: 'NG0304: 'op-formattable-control' is not a known element (used in the 'FormattableTextareaInputComponent' component template):
1. If 'op-formattable-control' is an Angular component, then verify that it is a part of an @NgModule where this component is declared.
2. If 'op-formattable-control' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
ERROR LOG: 'NG0304: 'op-basic-single-date-picker' is not a known element (used in the 'DateInputComponent' component template):
1. If 'op-basic-single-date-picker' is an Angular component, then verify that it is a part of an @NgModule where this component is declared.
2. If 'op-basic-single-date-picker' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.'
ERROR LOG: 'NG0303: Can't bind to 'templateOptions' since it isn't a known property of 'op-formattable-control' (us
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://cdn.jsdelivr.net/lodash/4/lodash.min.js"></script>
</head>
<body>

Keybase proof

I hereby claim:

  • I am myabc on github.
  • I am myabc (https://keybase.io/myabc) on keybase.
  • I have a public key whose fingerprint is C158 E20D 9348 CF1D C6F8 22D6 D8B5 72A6 6D48 932A

To claim this, I am signing this object:

Taking Rails beyond the asset pipeline

a workshop

RubyDay Italia, Firenze | Novembre 2016


Bienvenuto


diff --git a/frontend/app/ui_components/has-preview-directive.js b/frontend/app/ui_components/has-preview-directive.js
index e6ac2ee..e304e62 100644
--- a/frontend/app/ui_components/has-preview-directive.js
+++ b/frontend/app/ui_components/has-preview-directive.js
@@ -26,7 +26,15 @@
// See doc/COPYRIGHT.rdoc for more details.
//++
-module.exports = function() {
+module.exports = function($http, $location, $anchorScroll) {
@myabc
myabc / gist:e855281c3a68bcb1f974
Created December 11, 2014 11:07
Inplace Editor directive
<!--
PROBLEM: Inplace Editor directive has too many responsibilities.
-->
<inplace-editor
ined-type="select2"
ined-entity="workPackage"
ined-attribute="assignee"
ined-attribute-embedded="false">
</inplace-editor>
arr = [:a, :b, :c]
def check_item(item)
item == :c
end
Object.class_eval do
alias ⅋ method
end
require 'benchmark'
hash = { a: 'a', b: 'b', c: 'c', d: 'd' }.freeze
keys = [:a, :b].freeze
n = 500_000
Benchmark.bm do |x|
x.report do
n.times do