Skip to content

Instantly share code, notes, and snippets.

View hrvoj3e's full-sized avatar
💻
Cloning ...

Hrvoje hrvoj3e

💻
Cloning ...
View GitHub Profile
@hrvoj3e
hrvoj3e / me-i18n-locale-hr.js
Last active December 30, 2015 03:29
Croatian (hr) translation for mediaelement.js by johndyer
/*!
* This is a i18n.locale language object.
*
* Croatian translation by hrvoj3e, [email protected]
*
* @author
* hrvoj3e ([email protected])
*
* @see
* me-i18n.js
@hrvoj3e
hrvoj3e / fix-wordpress-permissions.sh
Created September 16, 2017 10:22 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@hrvoj3e
hrvoj3e / HLS_to_mp4
Created November 19, 2017 11:42 — forked from John07/HLS_to_mp4
Save/record HTTP Live Stream (short HLS, the kind of live stream that can be played by iOS devices) to disk as mp4 file
ffmpeg -re -i http://url.com/playlist.m3u8 -c copy -bsf:a aac_adtstoasc output.mp4
@hrvoj3e
hrvoj3e / gist:7b2f8160474e5e885b606a5201213124
Created January 23, 2018 10:56 — forked from jlee42/gist:3062069
invalid main GPT header
Last login: Fri Jul 6 09:25:53 on ttys004
jlee:~ jlee$ /usr/local/sbin/gdisk /dev/disk1
GPT fdisk (gdisk) version 0.8.2
Caution: invalid main GPT header, but valid backup; regenerating main header
from backup!
Caution! After loading partitions, the CRC doesn't check out!
Warning! Main partition table CRC mismatch! Loaded backup partition table
@hrvoj3e
hrvoj3e / nginx.conf
Created June 8, 2018 05:51 — forked from utahta/nginx.conf
nginx + php-fpm + reverse proxy
user nginx;
worker_processes 2;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}

mdadm

Glossary:

  • md: multiple devices
command description
cat /proc/mdstat show status of all raids
mdadm --detail /dev/md0 detailed status of raid md0
@hrvoj3e
hrvoj3e / README.md
Created September 7, 2018 14:28 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@hrvoj3e
hrvoj3e / docker-compose.yml
Created October 3, 2018 05:18 — forked from joelhans/docker-compose.yml
My self-hosting `docker-compose.yml` file. To use, 1) set up your DNS, 2) replace domain/email fields, 3) execute `docker-compose up -d`. Should work.
version: '2'
services:
portainer:
image: portainer/portainer
container_name: portainer
restart: always
environment:
- VIRTUAL_HOST=docker.DOMAIN.TLD
@hrvoj3e
hrvoj3e / .gitignore
Created October 10, 2018 11:13 — forked from hieblmedia/.gitignore
Gitignore - Exclude all except specific subdirectory
#
# If all files excluded and you will include only specific sub-directories
# the parent path must matched before.
#
/**
!/.gitignore
###############################
# Un-ignore the affected subdirectory
@hrvoj3e
hrvoj3e / django_aaieduhr.md
Created October 23, 2018 16:18 — forked from darbula/django_aaieduhr.md
Instructions on how to implement Single Sign-On authentication using AAI@EduHr in Django. In Croatian language.

AAI@EduHr: Django SSO

  1. Osnovni preduvjet za korištenje Single Sign-On (SSO) autentikacije u Django projektu je instalacija i konfiguracija paketa djangosaml2 koja se može obaviti prateći detaljne upute na stranici https://bitbucket.org/lgs/djangosaml2

    Referentne, testirane te u ovim uputama preporučene verzije potrebnih paketa su:

    • xmlsec1 1.2.18 (openssl)
    • pysaml2==0.4.3
    • djangosaml2==0.10.0