Skip to content

Instantly share code, notes, and snippets.

View gdarko's full-sized avatar
Crunching code, one line at a time.

Darko Gjorgjijoski gdarko

Crunching code, one line at a time.
  • Self-employed
  • The Internet
  • 17:30 (UTC +02:00)
View GitHub Profile
gdarko / linkify.jquery.js
Created April 3, 2016 13:39
jQuery Linkify
$.fn.linkify = function() {
$(this).on("click", function(){
window.location.href = $(this).attr('data-href');
return this;
* Be sure to include library scripts in this order. Can be placed either
* in the header or footer.
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
<script src="//"></script>
gdarko / 01_Laravel 5 Simple ACL
Created July 15, 2016 10:16 — forked from amochohan/01_Laravel 5 Simple ACL
Laravel 5 Simple ACL - Protect routes by an account / role type

#Laravel 5 Simple ACL manager

Protect your routes with user roles. Simply add a 'role_id' to the User model, install the roles table and seed if you need some example roles to get going.

If the user has a 'Root' role, then they can perform any actions.


Simply copy the files across into the appropriate directories, and register the middleware in App\Http\Kernel.php

gdarko / jquery.persistSortable.js
Created July 20, 2016 11:23
Simple plugin to persist positions of sortable areas
* Copyright (C) 2016 Darko Gjorgjijoski
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
gdarko / dg_wp_get_archives.php
Created September 14, 2016 15:58
Modified wp_get_archvies() to accept array as post type so that multiple post types are supported at same time
* Modified version of the wp_get_archvies()
* This function supports array for the post_type argument so that
* multiple post types are supported at same time
* @param $args
* @return mixed
* @author gdarko /
gdarko / style.css
Last active July 23, 2017 13:06
WordPress Social Sharing Icons
* This is very basic styling
.dg-sharing-icons ul.dg-sharing-icons-inner li i.fa {
color: gray;
.dg-sharing-icons ul.dg-sharing-icons-inner li {
display: inline-block;
margin-right: 15px;
gdarko / square-hover-boces.html
Last active August 19, 2017 09:12
Beautiful CSS Hover Boxes
<!DOCTYPE html>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="" rel="stylesheet">
<!-- Bootstrap CSS -->
gdarko /
Created September 4, 2017 10:02
VestaCP / BackupWordPress simple backup tool
echo "Running backup"
echo $fulldir
gdarko / style.css
Created October 11, 2017 20:03
WordPress Awesome Comment Styling
ol.comment-list {
list-style: none;
background: #f7f7f7;
padding: 10px;
float: left;
width: 100%;
.comment-metadata {
text-align: right;
gdarko / DG_PageTemplater.php
Last active October 20, 2017 07:56
Register WordPress page templates outside the theme
* This class can be used to register a template outside WordPress theme.
* NOTE: This class is fork of the original class which was hardcoded to look for
* the template in the plugin directory. After the modifications i added
* the possiblity new templates to be registered using hook.
* @author gdarko