Skip to content

Instantly share code, notes, and snippets.

View ManuelSchmitzberger's full-sized avatar

Manuel Schmitzberger ManuelSchmitzberger

View GitHub Profile
@ManuelSchmitzberger
ManuelSchmitzberger / create-cloud-template.sh
Last active January 30, 2022 20:57 — forked from meramsey/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
# This file is useful for reading the contents of the ops generated by ruby.
# You can read any graph defination in pb/pbtxt format generated by ruby
# or by python and then convert it back and forth from human readable to binary format.
import tensorflow as tf
from google.protobuf import text_format
from tensorflow.python.platform import gfile
def pbtxt_to_graphdef(filename):
with open(filename, 'r') as f:
@ManuelSchmitzberger
ManuelSchmitzberger / transform_graph.py
Created December 27, 2019 12:25 — forked from DibyaranjanSathua/transform_graph.py
Run different transformation on tensorflow model
import tensorflow as tf
from tensorflow.tools.graph_transforms import TransformGraph
def transform_graph(input_graph, output_graph):
""" Use to run different transform function on the input graph and generate a output graph. """
with tf.gfile.GFile(input_graph, 'rb') as fid:
od_graph_def = tf.GraphDef()
serialized_graph = fid.read()
od_graph_def.ParseFromString(serialized_graph)
od_graph_def = TransformGraph(od_graph_def, ['input_placeholder/input_image'], ['predicated_output'],
@ManuelSchmitzberger
ManuelSchmitzberger / intel-backlight-control.sh
Last active November 24, 2019 10:02
Intel Screen Backlight control
#!/bin/bash
# intel-backlight-control.sh [brightness-in/-decrease value]
# intel-backlight-control.sh +400
# intel-backlight-control.sh -400
folder="/sys/class/backlight/intel_backlight"
# the values can be read "/sys/class/backlight/intel_backlight/max_brightness"
max=24242
min=1000
@ManuelSchmitzberger
ManuelSchmitzberger / Instructions.md
Last active November 7, 2019 12:58 — forked from mohakshah/Instructions.md
Builing ZFS on Raspberry Pi 3 running Rasbpian

Introduction

This is a tutorial for building and installing the latest release version (0.7.3 as of writing) of "ZFS on Linux" on a Raspberry Pi 3 running Raspbian Stretch. Specifically, we'll be building the dkms version of ZoL, which saves you the hassle of re-compiling the kernel modules after every kernel update. Even though ZoL added support for building dkms packages for debian in version 0.7.3, the build process on a Raspberry Pi 3 is not quite straight-forward. Hopefully, these instructions will make it easier.

Steps

  1. Install the build dependencies.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential autoconf libtool
sudo apt-get install gawk alien fakeroot gdebi
@ManuelSchmitzberger
ManuelSchmitzberger / Arch-ZFSRoot-on-dm-crypt-UEFI.md
Last active July 10, 2020 07:27 — forked from kdwinter/Arch-ZFSRoot-on-dm-crypt-UEFI.md
ZFSRoot installation over a dm-crypt volume for Arch Linux (UEFI)

Install Arch Linux on root ZFS filesystem

Pre-installation

Download Arch linux

https://archlinux.org

Create bootable USB (don't add partition number!)

@ManuelSchmitzberger
ManuelSchmitzberger / tor-change-exitnode
Created November 17, 2017 12:18 — forked from kirelagin/tor-change-exitnode
Shell script to force Tor exit node change
#!/bin/sh
###
#
# Change Tor exit node
#
# Sometimes when using Tor you'd like to change the IP address that
# servers see when you connect (that is, change your Tor exit node).
# This happens automatically from time to time, but this shell script
# lets you force it.
#
@ManuelSchmitzberger
ManuelSchmitzberger / build.gradle
Last active March 8, 2016 08:31 — forked from alexsinger/build.gradle
Separate Crashlytics(Fabric) keys for debug and release buildTypes using Gradle
// The following code allows an app to report Crashlytics crashes separately
// for release and debug buildTypes when using Gradle. This code should be inserted
// into the specified locations within your build.gradle (Module:app) file
// The buildTypes { } block should be inserted inside the android { } block
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
ext.crashlyticsApiSecret = "release api secret"