This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def feature_enabled?(feature) | |
FeatureFlag.enabled?(feature, current_organization) | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$font-family-sans-serif: | |
// Cross-platform generic font family (default user interface font) | |
system-ui, | |
// Safari for macOS and iOS (San Francisco) | |
-apple-system, | |
// Windows | |
"Segoe UI", | |
// Android | |
Roboto, | |
// Basic web fallback |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// COPIED FROM HERE: https://www.jorgemanrubia.com/2019/02/16/form-validations-with-html5-and-modern-rails/ | |
import { Controller } from 'stimulus' | |
export default class extends Controller { | |
connect () { | |
this.element.setAttribute('novalidate', true) | |
this.element.addEventListener('blur', this.onBlur, true) | |
this.element.addEventListener('submit', this.onSubmit) | |
this.element.addEventListener('ajax:beforeSend', this.onSubmit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
!(function (e) { | |
var t = {}; | |
function n(o) { | |
if (t[o]) return t[o].exports; | |
var r = (t[o] = { i: o, l: !1, exports: {} }); | |
return e[o].call(r.exports, r, r.exports, n), (r.l = !0), r.exports; | |
} | |
(n.m = e), | |
(n.c = t), | |
(n.d = function (e, t, o) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$badge-gold-background: #FFE629; | |
$badge-gold-content: #E2A53C; | |
$badge-silver-background: #B0DBEC; | |
$badge-silver-content: #275665; | |
$badge-bronze-background: #FF6136; | |
$badge-bronze-content: #A52A07; | |
.badge-groups { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is Comperj. | |
The biggest petrochemical complex in Brazil. | |
It’s located in Itaboraí, a small city in the state of Rio de Janeiro. | |
The multibillion dollar project launched in 2008 and the plan was to open in 2011. | |
Thousands of Brazilians moved there to work. | |
But it’s 2018, and Comperj never opened. | |
Construction of the complex stopped in 2015, after it became a symbol of the largest corruption | |
scandal in Brazil’s history -- Operation Car Wash. | |
Hundreds of prominent Brazilians including CEOs, members of Congress and even a former | |
President have been implicated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def flatten(s): | |
if s == []: | |
return s | |
if isinstance(s[0], list): | |
return flatten(s[0]) + flatten(s[1:]) | |
return s[:1] + flatten(s[1:]) | |
l1 = [[1,2],[3,4],[[5,6],[7,8],[[[1,3]]]]] | |
print flatten(l1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.trix-button--icon-attach-files::before { | |
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA%2FPjxzdmcgaGVpZ2h0PSIxNnB4IiB2ZXJzaW9uPSIxLjEiIHZpZXdCb3g9IjAgMCAyNCAxNiIgd2lkdGg9IjI0cHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6c2tldGNoPSJodHRwOi8vd3d3LmJvaGVtaWFuY29kaW5nLmNvbS9za2V0Y2gvbnMiIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj48dGl0bGUvPjxkZXNjLz48ZGVmcy8%2BPGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIiBpZD0iUGFnZS0xIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSI%2BPGcgZmlsbD0iIzAwMDAwMCIgaWQ9IkNvcmUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMjYuMDAwMDAwLCAtNDYuMDAwMDAwKSI%2BPGcgaWQ9ImJhY2t1cCIgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoMTI2LjAwMDAwMCwgNDYuMDAwMDAwKSI%2BPHBhdGggZD0iTTE5LjQsNiBDMTguNywyLjYgMTUuNywwIDEyLDAgQzkuMSwwIDYuNiwxLjYgNS40LDQgQzIuMyw0LjQgMCw2LjkgMCwxMCBDMCwxMy4zIDIuNywxNiA2LDE2IEwxOSwxNiBDMjEuOCwxNiAyNCwxMy44IDI0LDExIEMyNCw4LjQgMjEuOSw2LjIgMTkuNCw2IEwxOS40LDYgWiBNMTQsOSBMMTQsMTMgTDEwLDEzIEwxMCw5IEw3LDkgTDEyLDQgTDE3LDkgTDE0LDkgTDE0LDkgWiIgaWQ9IlNoYXBlIi8%2B |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> answer = "yes" | |
>>> num_answers = 0 | |
>>> if answer: | |
... num_answers = num_answers + 1 | |
... | |
>>> answer = "" | |
>>> | |
>>> print num_answers | |
1 | |
>>> print answer |