kernel
# cd /usr/src/linux
# make nconfig
Gentoo Linux --->
Support for init systems, system and service managers --->
[ ] OpenRC, runit and other script based systems and managers
[*] systemd
source 'https://rubygems.org' | |
gem 'pg' | |
gem 'sequel' |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bio' | |
def parse_st_comment(comment) | |
comment.scan(/##(.+)-START##\n(.*)\n##\1-END##/m).each_with_object({}) {|(tagset, block), memo| | |
i = 0 | |
memo[tagset] = block.lines.chunk {|line| |
class ActionController::Parameters | |
def destruct_jsonapi | |
data = fetch(:data) | |
relationships = data.fetch(:relationships) { self.class.new } | |
attributes = self.class[*data.fetch(:attributes) { Hash.new }.flat_map {|key, value| | |
[key.underscore, value] | |
}] | |
relationships.each_with_object(attributes) {|(key, value), attrs| |
require 'json' | |
require 'nokogiri' | |
require 'open-uri' | |
def find_complete_row(doc, i) | |
prev = doc.at_css("#rgn_content4 tbody tr:nth-child(#{i.pred})").css('td').map(&:text) | |
prev.size == 10 ? prev : find_complete_row(doc, i.pred) | |
end |
require 'open3' | |
def system!(*args) | |
out, status = Open3.capture2e(*args) | |
raise RuntimeError, out unless status.success? | |
end |
form do |f| | |
f.semantic_errors | |
f.inputs do | |
f.input :name, input_html: {disabled: true} | |
f.input :tag_list, as: :select2_tags, collection: ActsAsTaggableOn::Tag.pluck(:name), input_html: {value: f.object.tag_list.to_s} | |
end |
# cd /usr/src/linux
# make nconfig
Gentoo Linux --->
Support for init systems, system and service managers --->
[ ] OpenRC, runit and other script based systems and managers
[*] systemd
`import Ember from 'ember'` | |
`import Session from 'simple-auth/session'` | |
makePromise = (promiseOrValue) -> | |
if promiseOrValue.then | |
promiseOrValue | |
else | |
Ember.RSVP.resolve(promiseOrValue) | |
AsyncSession = Session.extend |
{ | |
"vars": { | |
"@gray-darker": "lighten(#000, 13.5%)", | |
"@gray-dark": "lighten(#000, 20%)", | |
"@gray": "lighten(#000, 33.5%)", | |
"@gray-light": "lighten(#000, 60%)", | |
"@gray-lighter": "lighten(#000, 93.5%)", | |
"@brand-primary": "#428bca", | |
"@brand-success": "#5cb85c", | |
"@brand-info": "#5bc0de", |
#!/usr/bin/env ruby | |
require 'json' | |
Instance = Struct.new(:hostname, :amazon_id, :role) | |
def environment | |
basename = File.basename(__FILE__) | |
unless basename.include?('@') |