Skip to content

Instantly share code, notes, and snippets.

View julianxhokaxhiu's full-sized avatar
🚀
Impossible Is Nothing.

Julian Xhokaxhiu julianxhokaxhiu

🚀
Impossible Is Nothing.
View GitHub Profile
@julianxhokaxhiu
julianxhokaxhiu / PKGBUILD
Created December 13, 2015 16:49 — forked from fredmorcos/PKGBUILD
SDL2 Archlinux PKGBUILD for the Raspberry Pi
# Maintainer: Sven-Hendrik Haase <[email protected]>
# Modified by Fred Morcos <[email protected]> for the Raspberry Pi
pkgname=sdl2
pkgver=2.0.3
pkgrel=1
pkgdesc="A library for portable low-level access to a video framebuffer, audio output, mouse, and keyboard (Version 2)"
arch=('i686' 'x86_64' 'armv6h')
url="http://www.libsdl.org"
license=('MIT')
depends=('glibc' 'libxext' 'libxrender' 'libx11' 'libgl' 'libxcursor')
@julianxhokaxhiu
julianxhokaxhiu / pagespeed_optimize_images.sh
Last active December 7, 2024 21:46
Recursively optimize all PNG and JPG files wherever they are from the script position and inner ( based on OPTING, PNGCRUSH, ADVANCECOMP and JPEGOPTIM )
#!/bin/bash
# Improved as per feedback from @pascal - https://gist.github.com/julianxhokaxhiu/c0a8e813eabf9d6d9873#gistcomment-3086462
find . -type f -iname "*.png" -exec optipng -nb -nc {} \;
find . -type f -iname "*.png" -exec advpng -z4 {} \;
find . -type f -iname "*.png" -exec pngcrush -rem gAMA -rem alla -rem cHRM -rem iCCP -rem sRGB -rem time -ow {} \;
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec jpegoptim -f --strip-all {} \;
@julianxhokaxhiu
julianxhokaxhiu / enable_mongo.sh
Created February 7, 2016 14:21 — forked from sgnn7/enable_mongo.sh
Mongodb 3.2 on Ubuntu 15.10
echo '[Unit]
Description=High-performance, schema-free document-oriented database
After=syslog.target network.target
[Service]
User=mongodb
Group=mongodb
ExecStart=/usr/bin/mongod -f /etc/mongod.conf
[Install]
@julianxhokaxhiu
julianxhokaxhiu / update.sh
Last active February 21, 2016 00:25
OpenVPN VPNGate OpenElec 6.x update script
#!/bin/bash
# This shell script is based on http://brianhornsby.com/kodi_addons/openvpn addon
# and https://github.com/julianxhokaxhiu/vpngate-ovpn-exporter python script
# Make sure that you place this file and the python script inside /storage/vpn path
# This script is currently scraping for IT country code. Adapt it to your own flavor.
mkdir -p /storage/.kodi/userdata/addon_data/script.openvpn # Create the folder if it does not exist
rm -R /storage/.kodi/userdata/addon_data/script.openvpn/* IT 2>/dev/null # Make sure it's really empty
@julianxhokaxhiu
julianxhokaxhiu / _realurl_domain_language_mapping.md
Created April 7, 2016 08:13 — forked from a-r-m-i-n/_realurl_domain_language_mapping.md
RealURL Configuration for Domain == Language

This config shows an example of TYPO3 RealURL configuration, to map languages to domains.

Lets say the default language (L=0) is german and the foreign language is english (L=1). Normally RealURL would create links like that:

This example is about getting rid of the /en path segment.

@julianxhokaxhiu
julianxhokaxhiu / README.md
Last active August 28, 2020 13:03
Push IP machine on boot over PowerDNS via REST API

To make it work:

  1. systemctl enable systemd-networkd-wait-online.service

  2. Copy update-dns-record.service into /etc/systemd/system and run chmod 0755 /etc/systemd/system/update-dns-record.service

  3. Copy update-dns-via-api.sh into /root/.systemd/ and run chmod 0755 /root/.systemd/update-dns-via-api.sh

  4. Finally adjust update-dns-via-api.sh wth the right APIKEY value

@julianxhokaxhiu
julianxhokaxhiu / create-iso.sh
Created September 24, 2016 21:46
Simple bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
#!/bin/bash
#
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/
# Adapted to work with the official image available into Mac App Store
#
# Enjoy!
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
@julianxhokaxhiu
julianxhokaxhiu / gist:d4d8da6a0240de1de2cf3fea2308f871
Created February 3, 2017 10:27 — forked from Manu343726/gist:ca0ceb224ea789415387
Running ARM docker image with QEMU on x86_64 Arch Linux host
# Install quemu, docker, etc
yaourt -S qemu qemu-user-static binfmt-support
# The quemu-user-static AUR package is outdated and broken. The .deb package they pull is no longer in the ubuntu repository.
# Edit the PKGBUILD and use qemu-user-static_2.4+dfsg-3_amd64.deb (With SHA1 sum "84d83a16c60c82b6c579f2f750b04a3ac26c249b")
# Enable ARM emulation
update-binfmts --enable qemu-arm
@julianxhokaxhiu
julianxhokaxhiu / build.sh
Last active May 2, 2025 17:52
How to build minimal ARM QEMU Static from sources with EXECVE
#!/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
@julianxhokaxhiu
julianxhokaxhiu / build.sh
Last active June 18, 2024 23:11
How to build minimal AARCH64 QEMU Static from sources with EXECVE
#!/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