Skip to content

Instantly share code, notes, and snippets.

View daliborgogic's full-sized avatar
:octocat:
In Git we trust!

Dalibor Gogic daliborgogic

:octocat:
In Git we trust!
View GitHub Profile
@daliborgogic
daliborgogic / html-css-cheat-sheet.markdown
Last active July 29, 2016 09:29
HTML/CSS Cheat Sheet
object foo {
def main(args: Array[String]): Unit = {
println("Srecan Rodjendaaaan!")
}
}
@daliborgogic
daliborgogic / function.php
Last active June 1, 2017 11:18
WP REST API v2
// WP REST API v2
// Prepare Pages
add_filter('rest_prepare_page', 'remove_extra_data', 12, 3);
function remove_extra_data($data, $post, $context) {
if ($context !== 'view' || is_wp_error ($data)) {
unset ($data->data['excerpt']);
// ...
return $data;
}
{
"hex":"#BE2E22",
"websafe":"#cc3333",
"rgb":{
"r":190,
"g":46,
"b":34
},
"hsl":{
"h":5,
Browser Support
At present, we officially aim to support the following browsers:
IE9, IE10, IE11, IE Mobile 10
FF 30, 31
Chrome 34, 35
Safari 7, 8
Opera 23, 24
iOS Safari 7, 8
<?php
$headerImageDesktop = get_field('header_image_desktop', 'option');
$headerImageTablet = get_field('header_image_tablet', 'option');
$headerImageMobile = get_field('header_image_mobile', 'option');
if ( $headerImageDesktop && $headerImageTablet && $headerImageMobile ): ?>
<div class="headerConatiner">
<div class="headerImage">
@daliborgogic
daliborgogic / project_folder.md
Last active August 29, 2015 14:14
Setting up a Project Folder, Document Naming Convention & Project Folder Structure

Introduction

This document can be used as a guide to help organize your project folder and to provide an example on document naming conventions. It will also explain how to set up a project folder on for your project documentation. While planning any project, it is up to the project team on where documents go within each folder and the choice of document naming conventions, because every project is unique. The objective of providing a guide is to provide the following within each project:

  • Familiarity: Reduces the learning for people who move between projects. If they are familiar with a common structure, it is easier to file new things, and find old things.
@daliborgogic
daliborgogic / editorconfig#foo.txt
Last active April 18, 2016 08:32
editorconfig
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@daliborgogic
daliborgogic / .eslintrc
Created January 2, 2015 12:38
.eslintrc
{
"env": {
"node": true
},
"rules": {
// Rules are divided into sections from http://eslint.org/docs/rules/
// Possible errors
"no-cond-assign": 0, // regex matching is easier with statements in loop contitions
<!-- nav -->
<nav class="nav visualyHidden" role="navigation">
<div class="w700 clear">
<img class="showNav second" src="<?php echo get_template_directory_uri(); ?>/img/logo.svg" onerror="this.src='<?php echo get_template_directory_uri(); ?>/img/logo.png'; this.onerror=null;" width="40" height="40" alt="">
</div>
<?php //html5blank_nav(); ?>
<ul>
<li><a href="<?php echo home_url(); ?>"><?php the_field('anchor_home'); ?></a></li>
<li><a href="#<?php echo str_replace(' ','-', strtolower(get_field('anchor_about'))); ?>"><?php the_field('anchor_about'); ?></a></li>