Skip to content

Instantly share code, notes, and snippets.

View hi-ko's full-sized avatar

Heiko Robert hi-ko

  • ecm4u GmbH
  • Stuttgart, Germany
View GitHub Profile
@hi-ko
hi-ko / android-backup-apk-and-datas.md
Last active January 26, 2024 13:36 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Don't hesitate to read comments, there is useful tips, thanks guys for this !

Fetch application APK

@hi-ko
hi-ko / mbr-to-gpt-uefi.md
Created January 18, 2024 09:33 — forked from cjyar/mbr-to-gpt-uefi.md
Convert a disk from MBR to GPT+UEFI, in Linux.

Before starting, make sure you have a backup, and make sure to have a linux live boot ready to rescue your system. It's easy to mess this up!

  1. Use gdisk to convert the partition table to GPT.

    gdisk /dev/sda

  2. Create the "BIOS boot" partition that GRUB needs.

    n to create a new partition. Needs to be about 1MB. You can probably squeeze this in from sectors 34-2047. Use L or l to look up the code for "BIOS boot" (ef02).

  3. Write the new partition table.

    w

  4. Reload the partition table. > partprobe /dev/sda
### Remove all snapshots crteated by the zfs-auto-snapshot tool
zfs list -t snapshot -o name | grep zfs-auto-snap | tac | xargs -n 1 zfs destroy -r
@hi-ko
hi-ko / ldap sync fail fix.js
Created November 29, 2022 19:52 — forked from douglascrp/ldap sync fail fix.js
LDAP sync fail: Job DEFAULT.ldapPeopleJobDetail threw an unhandled Exception: org.springframework.dao.DataIntegrityViolationException: No property value exists for ID
// from https://hub.alfresco.com/t5/alfresco-content-services-forum/ldap-sync-fails-after-cleanalfproptablespostexec-sql/m-p/40015/highlight/true#M2224
var context = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext();
var SyncStatus = Packages.org.alfresco.repo.security.sync.SyncStatus;
var attributeService = context.getBean('attributeService', Packages.org.alfresco.service.cmr.attributes.AttributeService);
var ROOT_ATTRIBUTE_PATH = ".ChainingUserRegistrySynchronizer";
var STATUS_ATTRIBUTE = "STATUS";
var SUMMARY_ATTRIBUTE = "SUMMARY";
var zone = "ldap1";
@hi-ko
hi-ko / checkDockerDisks.sh
Created March 22, 2022 15:06 — forked from robsonke/checkDockerDisks.sh
This Bash script will loop through all running docker containers on a host and list the disk usage per mount. In case it's breaching the 65%, it will email you.
#!/bin/bash
# get all running docker container names
containers=$(sudo docker ps | awk '{if(NR>1) print $NF}')
host=$(hostname)
# loop through all containers
for container in $containers
do
echo "Container: $container"
@hi-ko
hi-ko / git_rebase.md
Created October 22, 2019 14:07 — forked from ravibhure/git_rebase.md
Git rebase from remote fork repo

In your local clone of your forked repository, you can add the original GitHub repository as a "remote". ("Remotes" are like nicknames for the URLs of repositories - origin is one, for example.) Then you can fetch all the branches from that upstream repository, and rebase your work to continue working on the upstream version. In terms of commands that might look like:

Add the remote, call it "upstream":

git remote add upstream https://github.com/whoever/whatever.git

Fetch all the branches of that remote into remote-tracking branches, such as upstream/master:

git fetch upstream