start unifi-controller:
$ docker run -d \
-e PUID=1000 \
-e PGID=1000 \
-e TZ=Etc/UTC \
| #!/bin/bash | |
| set -e | |
| ##### CHECK PARAMETERS ##### | |
| PRODUCTION=0 | |
| while [[ "$#" -gt 0 ]]; do | |
| case $1 in | |
| -p|--production) PRODUCTION=1 ;; | |
| *) echo "Unknown parameter passed: $1"; exit 1 ;; | |
| esac | |
| shift |
| #! /bin/bash | |
| set -e | |
| # set -x | |
| # Integration tests made easy ! | |
| # Locally it assumes DB and server is running, and on a CI it automagically starts them and waits till they're up | |
| # All tests are cURL based, using files on tmp to pass state and variables - this allows for very easy manual debugging | |
| # if a test fails, as the state remains on disk, and you can just copy/past the call | |
| function test() { |
| #!/bin/bash | |
| # inspired from https://github.com/jordansissel/fpm/issues/1323#issuecomment-450613806 | |
| if [ $# -ne 2 ]; then | |
| echo 'USAGE: ./deb2ipk.sh arch input-deb' | |
| echo 'WARNING: for amd64 set arch as x86_64' | |
| exit 1 | |
| fi | |
| set -e |
| var cssText = `.p-workspace-layout { | |
| height: 100% !important; | |
| top: 0px !important; | |
| position: absolute !important; | |
| left: 0px !important; | |
| right: 0px !important; | |
| grid-template-rows: 0px auto !important; | |
| } | |
| .p-workspace__primary_view { | |
| max-height: unset !important; |
| #include <string> | |
| #include <dlfcn.h> | |
| #include <stdio.h> | |
| #include <sys/mman.h> | |
| #include <unistd.h> | |
| #include <errno.h> | |
| #include <stdlib.h> | |
| using namespace std::literals; |
| #include <stdio.h> | |
| #include <sys/mman.h> | |
| #include <fcntl.h> | |
| #include <unistd.h> | |
| #include <string.h> | |
| #define STORAGE_ID "/SHM_TEST" | |
| #define STORAGE_SIZE 32 | |
| int main(int argc, char *argv[]) |
| #include <stdio.h> | |
| #include <string.h> | |
| // clang -O0 -Wall -g -fsanitize=fuzzer fuzzer.c && ./a.out | |
| int LLVMFuzzerTestOneInput(const char *Data, size_t Size) | |
| { | |
| int maxlen = (int) Size; | |
| const char *start = Data; |
| #!/usr/bin/python | |
| # | |
| # simple XDP eBPF program to flag connections using an eBPF map | |
| # this example adds connections to ::1 ::1 to a an eBPF map | |
| # depends on `bpftool` for now, as bcc is missing map pinning | |
| # | |
| # the map is spinned by the XDP program, and this python handler | |
| # will call `bpftool` to pin the map to a path to allow system-wide | |
| # access. the path will be removed when the program quits. | |
| # |
| /** | |
| * some musings around eBPF maps, for defining || reusing per-cpu maps | |
| * | |
| * maps defined here are accessible system-wide as they are defining or using a pin | |
| * | |
| * useful monitoring cmds: | |
| * sudo bpftool map dump pinned /sys/fs/bpf/h2o_map | |
| * sudo bpftool map show | |
| */ |