Skip to content

Instantly share code, notes, and snippets.

@marekjelen
marekjelen / pom.xml
Created December 3, 2021 09:14
Place pom.xml into empty directory and run the shell script and all the deps will be in lib directory.
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>test</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
RUN curl -sL -o /etc/yum.repos.d/centos-essentials.repo https://gist.githubusercontent.com/marekjelen/c08a3c3a548820144f2da01d2bad6279/raw/centos-essentials.repo
ENV PATH=/opt/essentials/bin:$PATH
@marekjelen
marekjelen / tree.rb
Created July 20, 2018 16:38
CTE based tree in Ruby on Rails
def ancestors(options = {})
options[:direction] ||= :up
self.tree_relation_builder(options)
end
def descendants(options = {})
options[:direction] ||= :down
self.tree_relation_builder(options)
end
#!/bin/bash
for i in {1..20}; do
cat <<EOF > tmp.json
{
"apiVersion": "v1",
"kind": "PersistentVolume",
"metadata": {
"name": "pv-${i}"
},
#!/usr/bin/env ruby
puts 'Hello!!!'
@marekjelen
marekjelen / readme.md
Last active October 18, 2017 11:38
Auxiliary Turris APs

Request for "SimpleTurris"

HW Requirements

  • Radio 2.4GHz and 5GHz
  • Ethernet port

Functions

  • When connected to network, will try to lookup Turris Omnia on 192.168.1.1 and will sync with it
docker run -p 8080:8080 -e CONTENT_URL_PREFIX="https://raw.githubusercontent.com/osevg/workshopper-content/36" -e WORKSHOPS_URLS="https://raw.githubusercontent.com/osevg/workshopper-content/36/_workshops/training.yml" -e CONSOLE_ADDRESS="console.<name>.gce.pixy.io:8443" -e ROUTER_ADDRESS="apps.<name>.gce.pixy.io" osevg/workshopper
oc new-app osevg/workshopper -e CONTENT_URL_PREFIX="https://raw.githubusercontent.com/osevg/workshopper-content/36" -e WORKSHOPS_URLS="https://raw.githubusercontent.com/osevg/workshopper-content/36/_workshops/training.yml" -e CONSOLE_ADDRESS="console.<name>.gce.pixy.io:8443" -e ROUTER_ADDRESS="apps.<name>.gce.pixy.io"

Keybase proof

I hereby claim:

  • I am marekjelen on github.
  • I am mjelen (https://keybase.io/mjelen) on keybase.
  • I have a public key whose fingerprint is E1D7 68F1 F750 5DC3 9FDB 3809 C279 1E6D 5578 7326

To claim this, I am signing this object: