Skip to content

Instantly share code, notes, and snippets.

@rastreus
rastreus / awx-Makefile
Created May 18, 2023 19:33
AWX Makefile
-include awx/ui_next/Makefile
PYTHON := $(notdir $(shell for i in python3.9 python3; do command -v $$i; done|sed 1q))
DOCKER_COMPOSE ?= docker-compose
OFFICIAL ?= no
NODE ?= node
NPM_BIN ?= npm
CHROMIUM_BIN=/tmp/chrome-linux/chrome
GIT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
MANAGEMENT_COMMAND ?= awx-manage
@rastreus
rastreus / link.js
Created April 23, 2023 21:44
Nextjs 13 Link Component
#!/usr/bin/env python3
"""
Telnet Client API for the 'telnetlib3' python package.
"""
# std imports
import argparse
import asyncio
import codecs
import struct
import sys
@rastreus
rastreus / openwrt-setup-wirelessbridge.sh
Created April 13, 2023 22:02
OpenWrt Wireless Bridge
##!/bin/ash
#openwrt squasfs/os uses ash shell
# remove first #-character from line 1 (one) if necessary
#helper function
lastCommandResult(){
action="$1"
if [ $? -gt 0 ] ; then
echo " ERROR: $action seems to have given some problems. Please check "
exit 1
@rastreus
rastreus / bsconfig.json
Created April 6, 2020 17:10
ReasonML ReasonReact IE 11 Configuration
{
"name": "appname",
"reason": {
"react-jsx": 3
},
"sources": [
{
"dir": "src",
"subdirs": true
},
@rastreus
rastreus / FabTestCTS.fs
Created April 12, 2019 06:29
This is an example of using CancellationTokenSource with Fabulous--the Xamarin.Forms Elmish framework.
namespace FabTestCTS
open System.Diagnostics
open Fabulous.Core
open Fabulous.DynamicViews
open Xamarin.Forms
module Cmd =
let ofAsyncMsgOption (p: Async<'msg option>) : Cmd<'msg> =
[ fun dispatch -> async { let! msg = p in match msg with None -> () | Some msg -> dispatch msg } |> Async.StartImmediate ]

Keybase proof

I hereby claim:

  • I am rastreus on github.
  • I am rastreus (https://keybase.io/rastreus) on keybase.
  • I have a public key ASB0uPngX5IURURlQmPNgQSTleaJtgJ1FntIGW6-oQeovwo

To claim this, I am signing this object: