Skip to content

Instantly share code, notes, and snippets.

🚀
Impossible Is Nothing.

Julian Xhokaxhiu julianxhokaxhiu

🚀
Impossible Is Nothing.
Block or report user

Report or block julianxhokaxhiu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@julianxhokaxhiu
julianxhokaxhiu / java.sh
Last active Sep 3, 2019
How to pass system properties with spaces in Java within your Bash scripts
View java.sh
#!/usr/bin/env bash
######################################################################################################################
# This script is a solution of when you want to pass Java options when they do come to the script as environment
# variable, or when you declare them inside a variable, using quotes. When you do so, you may obtain from the Java
# process an error that looks like this:
#
# $ ./java.sh
# Error: Could not find or load main class ...
#
@julianxhokaxhiu
julianxhokaxhiu / snippet.js
Created Jul 24, 2019
Print a list of values out of a selector contaning multiple matches
View snippet.js
/**
* This will print in your Console window a list of values out of a selector contaning multiple matches.
*
* How to install: Copy the whole line and drag it into your browser.
**/
javascript:var selector = prompt('Insert your CSS selector'); var tmpbuf = ''; document.querySelectorAll(selector).forEach( el => tmpbuf += (el.innerText||el.textContent)+'\n' ); console.log(tmpbuf)
@julianxhokaxhiu
julianxhokaxhiu / README.md
Last active Sep 10, 2019
Enable autodiscover AirPlay Client support on Arch Linux ( like on macOS )
View README.md

Enable autodiscover AirPlay Client support on Arch Linux ( like on macOS )

Step 1

Install required dependencies

$ pacman -S avahi pulseaudio-zeroconf

Step 2

@julianxhokaxhiu
julianxhokaxhiu / motion-start-recording.service
Created Mar 21, 2019
Configure motion to record at a specific time without motion detection and 24/7 live streaming
View motion-start-recording.service
# Create this file under /etc/systemd/system/
[Unit]
Description=Start motion recording
[Service]
Type=oneshot
ExecStart=/usr/bin/curl http://localhost:8080/0/action/eventstart
@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Created Oct 3, 2018
Simple bash script to create a Bootable ISO from macOS Mojave Install Image from Mac App Store
View create-iso.sh
#!/bin/bash
#
# How to use:
# 1. copy this shell file somewhere in your Mac
# 2. chmod +x create-iso.sh
# 3. $ sudo ./create-iso.sh
#
# The ISO file will be located in your Desktop when the script will be complete
hdiutil create -o /tmp/Mojave.cdr -size 6000m -layout SPUD -fs HFS+J
@julianxhokaxhiu
julianxhokaxhiu / prepare_sdcard.sh
Last active Feb 23, 2018
Easy bash script to install ArchLinuxARM for RPi3 on an SD Card
View prepare_sdcard.sh
#!/bin/bash
#
# Pre-requisite: move this script next to the .tar.gz image file
# you can download at http://os.archlinuxarm.org/os/ArchLinuxARM-rpi-3-latest.tar.gz
#
# Usage: ./prepare_sdcard.sh /dev/sdb
#
#####################################
DRIVE_PATH=$1
@julianxhokaxhiu
julianxhokaxhiu / helm-rbac.md
Created Nov 6, 2017 — forked from mgoodness/helm-rbac.md
Helm RBAC setup for K8s v1.6+ (tested on minikube)
View helm-rbac.md
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
@julianxhokaxhiu
julianxhokaxhiu / json.sh
Created Aug 29, 2017
Example for a nicer JSON typing with ENV vars, in a Bash script
View json.sh
#!/bin/bash
FOO="bar"
JSON=$(cat <<EOF
{
"foo": "$FOO"
}
EOF
)
@julianxhokaxhiu
julianxhokaxhiu / Readme.md
Created Aug 20, 2017
Fix Resonic Player and Logitech SetPoints MediaKeys events ( Windows )
View Readme.md
  1. Open C:\Program Files\Logitech\SetPointP\players.ini
  2. Add these lines to their respective sections
[Players]
Resonic=wac,Resonic.exe,ResonicWnd,xxx,xxx,xxx,xxx,xxx,xxx,xxx,0,1,Resonic

[Players.Display]
Resonic=Resonic
  1. Restart your PC - OR - Kill 'Logitech SetPoint Event Manager' via Task manager and reopen the Logitech Setpoint software settings from Start menu or Control Panel
@julianxhokaxhiu
julianxhokaxhiu / build.sh
Last active Apr 14, 2019
How to build minimal AARCH64 QEMU Static from sources with EXECVE
View build.sh
#!/bin/bash
#
# IMPORTANT!
# At the moment this script is forged only for Debian ( tested on 8.x release ).
# Although my efforts were put on building this also on Arch Linux or Alpine, at the moment only Debian seems to be able to build it.
# Also, not sure why these instructions where nowhere on the internet, therefore I leave them here for whoever need them.
#
###########
# Add Backports repo support
You can’t perform that action at this time.