- (Optional if on Docker) Run your docker instance
- Ensure that you include
--privileged
flag - Ensure to have
qemu-user-static
package in your Dockerfile
- Ensure that you include
- Add
--arch
flag to flatpak's manifest orbuild-init
,runtime --install
,runtime --update
,build-export
, andbuild-bundle
stages if doing it manually. - Add new binfmt for your target arch. This is because you won't have qemu within the Sdk probably and you can't bindmount
/usr
into the flatpak container- WARNING! This will change handling of those arch QEMU emulators on your host too!
- Mount binfmt with
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
- Remove old qemu mapping with
echo -1 > /proc/sys/fs/binfmt_misc/qemu-<arch_name>
This file contains 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
# Fail2Ban configuration file | |
# | |
# Author: Srdjan Grubor <sgnn7@sgnn7.org> | |
[Definition] | |
# Option: actionstart | |
# Notes: Executed once at start of Fail2Ban. | |
# Values: CMD | |
actionstart = iptables -N fail2ban-PERMABAN-LOGGER |
This file contains 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
# project nfd (0.5.0) configured on Thu Jan 12 19:43:23 2017 by | |
# waf 1.8.9 (abi 98, python 2070bf0 on linux2) | |
# using ./waf configure --prefix=/usr --includedir=/usr/include --mandir=/usr/share/man --infodir=/usr/share/info --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib/arm-linux-gnueabihf --libexecdir=/usr/lib/arm-linux-gnueabihf --without-websocket --without-libpcap | |
# | |
---------------------------------------- | |
Setting top to | |
/usr/src/packages/BUILD/nfd-0.5.0+dev1.2d26161 | |
---------------------------------------- | |
Setting out to | |
/usr/src/packages/BUILD/nfd-0.5.0+dev1.2d26161/build |
This file contains 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
#!/bin/bash -e | |
CURRENT_DIR=$(pwd) | |
BASE_URI="http://kernel.ubuntu.com/~kernel-ppa/mainline" | |
FINGERPRINT="60AA 7B6F 3043 4AE6 8E56 9963 E50C 6A09 17C6 22B0" | |
ARCH=$(dpkg --print-architecture) | |
declare -A FILES=([sources]="SOURCES" \ | |
[commit]="COMMIT" \ | |
[linux-image]="linux-image- generic_ ${ARCH}" \ |
This file contains 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
#!/bin/bash -e | |
EC2_REGION="us-west-1" | |
DEFAULT_PROGRESS_WAIT=5 | |
# ========== SNAPSHOT WAIT ============== | |
snapshot_id="snap-testtesttest" | |
while [ "$snapshot_progress" != "100%" ]; do | |
sleep "$DEFAULT_PROGRESS_WAIT" |
This file contains 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
#!/bin/bash -e | |
BITS=${BITS:-4096} | |
KEY_ENCRYPTION_PASS=$(apg -a 1 -E '?|$%()\<>^!*`{}[],.' -m 16 -n 1) | |
if [ $# -lt 2 ]; then | |
echo "Usage $0 <FQDN> [ <subjAltName> ... ] <CSR challenge pass>" | |
exit 1 | |
fi |
This file contains 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
$ sudo dhcpdump -i wlan0 | |
... | |
TIME: 2017-12-21 10:43:43.110 | |
IP: 192.168.10.1 (9c:ad:ef:31:c2:3e) > 192.168.10.148 (d8:fc:93:14:df:3e) | |
OP: 2 (BOOTPREPLY) | |
HTYPE: 1 (Ethernet) | |
HLEN: 6 | |
HOPS: 0 | |
XID: b7f2490e | |
SECS: 0 |
This file contains 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
FROM ubuntu:18.04 | |
LABEL version="0.1" | |
ENV OUTPUT_DIR="/opt/artifacts" | |
RUN mkdir $OUTPUT_DIR | |
VOLUME $OUTPUT_DIR | |
# Packaging requirements |
This file contains 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
package main | |
// Author: Srdjan Grubor | |
// License: Apache-2.0 | |
import ( | |
"fmt" | |
) | |
// Interface common for all classes |
This file contains 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 OldErrorClass | |
def self.new(msg) | |
Class.new(RuntimeError) do | |
def initialize(*args) | |
@args = args | |
end | |
define_method(:to_s) do | |
@args.each.with_index.reduce(msg) do |m,(x,i)| | |
m.gsub(Regexp.new("\\{#{i}}"), x || 'nil') | |
end |