Skip to content

Instantly share code, notes, and snippets.

View nmilosev's full-sized avatar

Nemanja Milosevic nmilosev

View GitHub Profile
[ 16%] Built target gen_onnx_operators_proto
[ 16%] Built target gen_onnx_data_proto
make[2]: warning: -j4 forced in submake: resetting jobserver mode.
Scanning dependencies of target onnx_proto
make[2]: warning: -j4 forced in submake: resetting jobserver mode.
[ 21%] Building CXX object CMakeFiles/onnx_proto.dir/onnx/
nmilosev /
Created June 7, 2022 20:35
ONNX recipe draft
from os.path import join
import os
import sh
class OnnxRecipe(PythonRecipe):
version = 'v1.11.0'
url = 'git://'
depends = ['protobuf_cpp', 'pybind11', 'setuptools']
site_packages_name = 'onnx'
call_hostpython_via_targetpython = False
nmilosev /
Last active December 9, 2021 15:55
Quick Fedora Cloud VM w/QEMU
#!/usr/bin/env bash
# Quickily setup a Fedora Minimal Cloud VM with qemu
# Supports aarch64 and x86_64
# No KVM by default, add -accel=kvm to qemu call
export VER=35
export ARCH=x86_64
export DISK_SIZE=20G
export VM_HOST=fedora-cloud
export VM_USER=fedora
nmilosev /
Created June 27, 2021 10:45
Alpine Linux 3.13 (2021) list installed packages sorted by size
apk info -e -s \* | xargs -n5 | awk '{print $4,$5,$1}' | sort -run > SIZES
cat SIZES | grep MiB
cat SIZES | grep KiB
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.1" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
<persistence-unit name="prod" transaction-type="JTA">
<!-- Below I'm using default Wildfly Datasource for H2 Database -->
<property name="javax.persistence.schema-generation.database.action" value="drop-and-create"/>
nmilosev /
Created May 27, 2018 21:31 — forked from ashutosh-mishra/
How to run custom script from init.rc, How to Extract Android Kernel And Modify The Boot Ramdisk(Android 4+)

init.rc changes

init.rc changes to run any script Can be used to start any android application, service

on property:dev.bootcomplete=1
    exec - system system -- /system/bin/sh <custom script path>
    # exec - system system -- /system/bin/sh /data/local/bootscript/

Script can contains applications start, stop commands

$servername = "localhost";
$username = "root";
$password = "PROMENITI!";
$dbname = "test";
// Create connection
$conn = new mysqli($servername, $username, $password, $dbname);
// Check connection
if ($conn->connect_error) {
<!DOCTYPE html>
<script src=""></script>
<body ng-app="myApp" ng-controller="todoCtrl">
<h2>My Todo List</h2>
<form ng-submit="todoAdd()">
<input type="text" ng-model="todoInput" size="50" placeholder="Add New">
<input type="submit" value="Add New">