Skip to content

Instantly share code, notes, and snippets.

@primozcigler
primozcigler / themeforest-contract.md
Last active August 19, 2021 02:41 — forked from malarkey/Contract Killer 3.md
Modified version of @malarkey's Killing Contract for use for the ThemeForest cooperation (more dev to dev team than dev to client).

Contract for developing a Drupal theme for selling on the ThemeForest

Between us: [ProteusNet d.o.o., Rudarska cesta 11, 8281 Senovo, Slovenia, EU] and you: [partner]

Summary:

We’ll always do our best to fulfil the scope of this cooperation, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

So in short;

@primozcigler
primozcigler / rules.md
Last active December 28, 2015 11:18
Coding rules and patterns
@primozcigler
primozcigler / .gitignore
Last active December 29, 2015 08:49
My talks notes from WordCamp London 2013
*.html
@primozcigler
primozcigler / tooling.md
Last active December 29, 2015 11:39
My tooling, the tools I use for the advanced web development which make my life easier

On my tooling

I usually send this file if someone is working on the same code as I do. Just a quick overview of my tooling. Hard punishment for the guys which don't listen to me.

Command line tools

@primozcigler
primozcigler / marko-learning.md
Last active December 30, 2015 17:59
Learning course for the new coworker Marko

Naloge

Ta teden bo predvsem poudarek na SASS in JavaScript. Če boš tako hiter kot na začetku, potem se proti koncu tedna bolj resno lotiva Grunt, Bower in ostalih CLI orodij.

Ta fajl bom updateal tekom tedna za vsak dan, glede na napredek.

JavaScript

V tem delu se boš spoznal z osnovami JavaScripta. Poudarek bo na jQuery, ker boš to sigurno potreboval.

@primozcigler
primozcigler / usage.js
Last active August 29, 2015 14:10
UTM link decorator, AMD module. It decorates all your links you pass with the current UTM parameters from URL.
require( [ 'jquery', 'utm-decorator' ] , function ( $, Decorator ) {
'use strict';
// decorate all links to themeforest and to our demo page on page load
$( function() {
var utmDecorator = new Decorator;
$( '[href*="themeforest.net"], [href*="proteusthemes.com"]' ).each( function ( index, $el ) {
utmDecorator.decorate( $el );
} );
} );
@primozcigler
primozcigler / class-pt-customize-control-range.php
Created March 17, 2015 10:07
Footer widgets layout customizer control.
<?php
/**
* Range Control Class
*/
class WP_Customize_Range_Control extends WP_Customize_Control {
/**
* @access public
* @var string
@primozcigler
primozcigler / zendesk-api-script.js
Last active August 29, 2015 14:22
Using Zendesk API for article in multiple sections
// fix to display general questions in themes' sections
// using Zendesk API
// @link https://developer.zendesk.com/rest_api/docs/help_center/articles#list-articles
(function() {
if ( $( '.breadcrumbs a[href*="200506781"]' ).length ) { // 200506781 is ID of the section for general questions
var config = {
$articleList: $( 'ul.article-list' ),
tmpl: _.template( '<li><a href="<%= url %>"><%- title %></a></li>' ),
apiUrl: 'https://proteusthemes.zendesk.com/api/v2/help_center/sections/200132421/articles.json',
};
@primozcigler
primozcigler / pt-working-hours.html
Last active October 31, 2016 08:36
ProteusThemes support working hours widget. Made with moment.js
<html>
<head>
<title>support opening time</title>
<!-- deps: jquery, underscore.js, moment.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.4.0/moment.min.js"></script>
<script>
jQuery( document ).ready( function ( $ ) {
/**
@primozcigler
primozcigler / http2hosting-specs.md
Last active August 29, 2015 14:24
http2hosting.com specs

Overview

HTTP2hosting.com is a website where users can find a list of all the providers (hosting companies) which provide hosting on a new HTTP/2 protocol.

This spec is not, by any stretch of the imagination, complete. All of the wording will need to be revised several times before it is finalized. The graphics and layout of the screens is shown here merely to illustrate the underlying functionality. The actual look and feel will be developed over time with the input of graphics designers and iterative user feedback.

This spec simply discusses what the user sees when they interact with HTTP2hosting.com.

Scenarios