Skip to content

Instantly share code, notes, and snippets.

Miljan miljan-aleksic

Block or report user

Report or block miljan-aleksic

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View calendar-matrix.js
import getYear from 'date-fns/get_year'
import getMonth from 'date-fns/get_month'
import addDays from 'date-fns/add_days'
import startOfWeek from 'date-fns/start_of_week'
const rows = range(6)
const cols = range(7)
/**
* Returns a two-dimensional array with calendar represented dates
@miljan-aleksic
miljan-aleksic / .htaccess
Last active Jan 5, 2017
Apache Standard Security Headers
View .htaccess
## Security Headers - as recommended at https://securityheaders.io ##
Header Set Strict-Transport-Security "max-age=31536000; includeSubDomains"
Header Set Content-Security-Policy "script-src 'self' *.google-analytics.com"
Header Set X-Frame-Options "SAMEORIGIN"
Header Set X-Content-Type-Options "nosniff"
Header Set X-XSS-Protection "1; mode=block"
## Security Headers ##
@miljan-aleksic
miljan-aleksic / fonts.sass
Created Jan 4, 2017
Load Fonts Asynchronously
View fonts.sass
$woff: 'd09GRgABAAAAADP0AA4AAAAAVtQAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABRAAAABYAAAAWABMA10dQT1MAAAFcAAAKSAAAEp4KAR6uR1NVQgAAC6QAAAAMAAAADAAVAApPUy8yAAALsAAAAFUAAABgpb1dQGNtYXAAAAwIAAAAjAAAAMSO969ZZ2FzcAAADJQAAAAIAAAACAAAABBnbHlmAAAMnAAAIT4AADlcpPccjmhlYWQAAC3cAAAANgAAADYCsarKaGhlYQAALhQAAAAfAAAAJAdpA91obXR4AAAuNAAAAg8AAANc6GctPGxvY2EAADBEAAABnwAAAbCX+aaXbWF4cAAAMeQAAAAdAAAAIAEeADhuYW1lAAAyBAAAAKUAAAEyFvIw23Bvc3QAADKsAAABRgAAAd30Yz55AAEAAAAMAAAAAAAAAAIAAQADANYAAQAAeNokjwPMnAEMhp8PZ99s27Zt27YdzbbthbNt27Zts2vuT823xQC8pCQ7Rvc2/XvixgYQiVWMbh36ag7iIq2ZMetW2RLrbGAUN1oak0L/jHum2wyajc0VFlZKK7uV12putbU6WwusNdYp64PttHvb++wn9j9HbccYxxbHL2dp5wqX7Srrqu0a4zrgrute5EnqGec55W3uneJ94cvoG+Yf6DvkT+0f6J/mn+M/4n8UKB3YFtgT9AarB3sGVwXfhXKHmoZWhW6FfoT+he1wynD6cNFw9XDd8KzwuwgRbyRxZEJkQ+RdlGjZaH1MEuIjDERJgJNEpMJLBjITj6xk1zgneUhKfsqQkopK2alMNXJQkzpaqUd9CtCQthSit1J5+ipVYIhSRYYrVWKaUmWWsZwqrGeTTp/iNLW4xBXdcU2pPm788piMOCkiryimUlzeU1KeM44Ap7XmwydviScjiC/bSaIdqeQ7GeUSubSzvnxlnJxhk3zgknwiPgH5RgKd0E6SyRtSaCWl5vJrXFi7K2qtmnzRO5pTTz7qhqc01k1N
@miljan-aleksic
miljan-aleksic / ga.js
Created Jan 5, 2017
Load Google Analytics from external file
View ga.js
window.addEventListener('load', function () {
ga('create', 'UA-XXXXXXXX-1', 'auto')
ga('send', 'pageview')
})
View Add Style to Head.js
export function addHeadStyle (css) {
const head = document.head || document.getElementsByTagName('head')[0]
const style = document.createElement('style')
style.type = 'text/css'
if (style.styleSheet) {
style.styleSheet.cssText = css
} else {
style.appendChild(document.createTextNode(css))
@miljan-aleksic
miljan-aleksic / Dockerfile
Last active Jan 22, 2018
Docker with Joomlatols
View Dockerfile
FROM composer:1.5 AS builder
RUN composer global require joomlatools/console
FROM php:7.0-apache
# Disable remote database security requirements.
ENV JOOMLA_INSTALLATION_DISABLE_LOCALHOST_CHECK=1
# Enable Apache Rewrite Module
RUN a2enmod rewrite
@miljan-aleksic
miljan-aleksic / sketch-never-ending.md
Created Sep 8, 2018 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial
View sketch-never-ending.md

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com
127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com
You can’t perform that action at this time.