Skip to content

Instantly share code, notes, and snippets.

// SCSS for https://github.com/mbenford/ngTagsInput/
// Marko Zabreznik 4.2.2014
.ngTagsInput {
* {
@include box-sizing(border-box);
&:before, &:after {
@include box-sizing(border-box);
}
/*
* angular-ubilabs-geocomplete
* (c) 2014 Marko Zabreznik http://zabreznik.net
* License: MIT
*/
/*
* What is it: a simple factory that lazy loads google geo maps and ubilabs jquery.geocomplete.js
*
* You need: Angular, jQuery and Underscore
@MarZab
MarZab / form.json
Created February 5, 2015 20:21
angular-schema-form + ngStrap Select
form: [
{
"key": "wizzard",
"type": "strap-select"
},
]
@MarZab
MarZab / gist:a582488418f730657fa6
Last active August 29, 2015 14:16
Disable WordPress Feed Comments
<?php
/*
Plugin Name: Disable Feed Comments
Description: Disable commenting, comment feeds
Author: Marko Zabreznik
Version: 0.1
Author URI: http://zabreznik.net
*/
// if a comments template is requested, quit
@MarZab
MarZab / gist:fff319b893d3209c7eba
Created March 27, 2015 22:44
Statistics of WordPress locale usage per capita (native speakers); data from translate.wordpress.org and WikiPedia
Locale Release Pack Total Native speak. Total per NS
en 17037257 — 17037257 360 0.04732571389
nb_NO 55975 101078 157053 5 0.03141060000
nl_NL 444729 44564 489293 22 0.02224059091
sv_SE 151115 9325 160440 9.2 0.01743913043
fr_FR 1038957 237164 1276121 75 0.01701494667
de_DE 1080555 415812 1496367 89 0.01681311236
sk_SK 25968 52657 78625 5.2 0.01512019231
fa_IR 829918 55124 885042 60 0.01475070000
sl_SI 13247 22763 36010 2.5 0.01440400000
@MarZab
MarZab / __init__.py
Created July 2, 2015 20:46
Ajenti Widget Arbitrary Shell Command Output
from ajenti.api import *
from ajenti.plugins import *
info = PluginInfo(
title='Shiget',
icon='cog',
dependencies=[
PluginDependency('main'),
PluginDependency('dashboard'),
],
@MarZab
MarZab / WiseTimetableToiCalendarConverter.php
Last active October 11, 2015 23:47
Wise Timetable to iCalendar Converter
<?php
/*
* Wise Timetable to vCalendar Converter
* @Author Marko Zabreznik
* @copyright Marko Zabreznik
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU/GPL
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
* PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM,
@MarZab
MarZab / Vagrantfile
Created June 25, 2015 17:59
Ajenti Demo Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure('2') do |config|
config.vm.box = "debian/jessie64"
config.vm.hostname = "ajenti-dev"
config.vm.network "private_network", ip: "192.168.150.170"
config.vm.network "forwarded_port", guest: 8000, host: 8000
@MarZab
MarZab / tooltip.js
Created August 5, 2014 09:19
my take on popup tool-tips title replacements with Angular.js
/*
Why include huge tooltip libraries when something like this does the job perfectly
*/
app.directive('tooltip', [function () {
return { link: function (scope, element, attr) {
// use tag's title text for a popup
element
.addClass('tooltip-wrap')
.append(angular.element('<div class="tooltip-text">'+attr.title+'</div>'))
.attr('title', null);
@MarZab
MarZab / Gruntfile.js
Last active May 20, 2017 18:23
comments for npm package.json with a grunt.js task
/*jslint node: true */
'use strict';
module.exports = function (grunt) {
/*
1. make package.json.js and export the json that will be saved as package.json
2. run grunt package.json, the new file will be written and you get a patch as well
*/
grunt.registerTask('package.json', function () {