Skip to content

Instantly share code, notes, and snippets.

View xitology's full-sized avatar

Kirill Simonov xitology

View GitHub Profile
@xitology
xitology / configure_networks.diff
Created May 14, 2018 17:14
Fixed generation of /etc/netplan/50-vagrant.yaml
--- /opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/guests/debian/cap/configure_networks.rb.orig 2018-05-14 12:07:52.356332926 -0500
+++ /opt/vagrant/embedded/gems/2.1.1/gems/vagrant-2.1.1/plugins/guests/debian/cap/configure_networks.rb 2018-05-14 12:09:59.085264102 -0500
@@ -37,7 +37,9 @@
ethernets = {}.tap do |e_nets|
networks.each do |network|
e_config = {}.tap do |entry|
- if network[:ip]
+ if network[:type] == :dhcp
+ entry["dhcp4"] = true
+ else
julia> using DataKnots
julia> usedb!(
@VectorTree (name = [String], employee = [(name = [String], salary = [Int])]) [
"POLICE" ["GARRY M" 260004; "ANTHONY R" 185364; "DANA A" 170112]
"FIRE" ["JOSE S" 202728; "CHARLES S" 197736]
])
│ DataKnot │
│ name employee │
──┼────────────────────────────────────────────────────────────┤
(it .+ 4) >> it .* 6
42
field(:name)
["POLICE", "FIRE"]
it.name
["POLICE", "FIRE"]
["POLICE", "FIRE"]
using QueryCombinators.Planar
using QueryCombinators.Queries
db = @Planar (department = [&DEPT], employee = [&EMP]) [
[1, 2] [1, 2, 3, 4]
] where {
DEPT = @Planar (name = [String], employee = [&EMP]) [
"POLICE" [1, 2]
// ANDL sample queries implemented in Rabbit
// See https://github.com/davidandl/Andl/blob/master/Sample/SPPsample1.andl
// Q1. Get suppliers names who supply part “P2”.
part["P2"].supplier_x_part.supplier.name
// or
supplier_x_part
:((_::##Plan#8084,##X#8035::RBT.Iso{Void})->begin # /home/xi/xitology/prometheus/community/rbt-proto/jl/pipe.jl, line 95:
begin # /home/xi/xitology/prometheus/community/rbt-proto/jl/kind.jl, line 663:
Seq{Tuple{UTF8String}}(Tuple{UTF8String}[data(begin # /home/xi/xitology/prometheus/community/rbt-proto/jl/pipe.jl, line 665:
##X0#8067 = Iso{Department}(##Y#8066) # /home/xi/xitology/prometheus/community/rbt-proto/jl/pipe.jl, line 666:
Iso{Tuple{UTF8String}}(tuple(data(begin # /home/xi/xitology/prometheus/community/rbt-proto/jl/pipe.jl, line 349:
Iso{UTF8String}(_.#map#department/name[data(##X0#8067)])
end)))
end) for ##Y#8066 = begin # /home/xi/xitology/prometheus/community/rbt-proto/jl/pipe.jl, line 307:
Seq{Department}(_.#set#department)
end])
paths:
/:
widget: !<Page>
title: RexDB Study Manager
menu: !<Menu>
- !<Link>
label: Grants
href: grant/
- !<Link>