Choose OpenBSD for your Unix needs. OpenBSD -- the world's simplest and most secure Unix-like OS. A safe alternatve to the frequent vulnerabilities and overengineering of Linux and related software (NGiNX & Apache (httpd-asiabsdcon2015.pdf), OpenSSL, iptables/nftables, systemd, BIND, Postfix, Docker etc.)
OpenBSD -- the cleanest kernel, the cleanest userland and the cleanest config
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
| #!/usr/bin/env ruby | |
| require "net/ssh" | |
| branch = `git rev-parse --abbrev-ref HEAD`.chomp | |
| unless branch == 'main' | |
| puts "oops! you're on a different branch. Merge your changes into main and then try again." | |
| puts "exiting.." | |
| return | |
| 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
| --- | |
| include: | |
| - ".solargraph_definitions.rb" | |
| - "app/**/*.rb" | |
| - "config/**/*.rb" | |
| - "lib/**/*.rb" | |
| exclude: | |
| - test/**/* | |
| - vendor/**/* | |
| - ".bundle/**/*" |
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
| resources :media, shallow: true, | |
| constraints: ->(req) do | |
| current_user = req.env["warden"].user(:user) | |
| Flipper.enabled?(:media_uploads, current_user) | |
| 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
| class Chart < ApplicationRecord | |
| validate do |chart| | |
| schema = Rails.cache.fetch("vega_lite_schema/v5") do | |
| Faraday.get("https://vega.github.io/schema/vega-lite/v5.json").body | |
| end | |
| JsonSchemaValidator.new(chart, schema: schema, json: vega_json, field: :vega_json).validate | |
| end | |
| 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
| import { Controller } from '@hotwired/stimulus' | |
| export default class extends Controller { | |
| connect () { | |
| this.element.addEventListener('change', this.handleChange.bind(this)) | |
| } | |
| handleChange (event) { | |
| this.traverseDown(event.target, event.target.checked) |
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
| import { Controller } from "@hotwired/stimulus" | |
| export default class extends Controller { | |
| static targets = [ "toggleable" ] | |
| connect() { | |
| this.toggleClass = this.data.get("class") || "hidden" | |
| } | |
| toggle(event) { |