Skip to content

Instantly share code, notes, and snippets.

Ivan Dorić ivandoric

Block or report user

Report or block ivandoric

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
ivandoric / wl-api.php
Created May 5, 2019
Creating WordPress Rest API Custom Endpoints
View wl-api.php
* Plugin Name: Custom API
* Plugin URI:
* Description: Crushing it!
* Version: 1.0
* Author: Art Vandelay
* Author URI:
ivandoric / gulpfile.js
Last active Jul 14, 2019
Adding Svelte To Your Website Using Gulp and Webpack
View gulpfile.js
// This is the code used in video "How To Add Svelte To Your Site?"
// Check out the video here:
const gulp = require('gulp')
const sass = require('gulp-sass')
const browsersync = require('browser-sync').create()
const webpack = require('webpack')
const webpackStream = require('webpack-stream')
ivandoric /
Created Jun 19, 2019 — forked from graffic/
Downloading steam games from another computer/faster line

Framing the issue

With almost no bandwith at home, I needed a way to download DOOM that didn't involve blocking the home internet line for two days.


Using steamcmd you can use any computer to download steam games.


  1. Install it
  2. Open it and loging with your username and password: login username password
ivandoric / list.phtml
Last active Jun 13, 2019
magento: Check if product is new in product listing
View list.phtml
$newFromDate = Mage::getModel('catalog/product')->load($_product->getID())->getNewsFromDate();
$newToDate = Mage::getModel('catalog/product')->load($_product->getID())->getNewsToDate();
$now = Mage::app()->getLocale()->date()->toString(Varien_Date::DATETIME_INTERNAL_FORMAT);
if(($newFromDate < $now && $newFromDate != NULL) && ($newToDate > $now || $newToDate == "")){
echo "New Product";
View momo.js
/* eslint-disable quote-props */
const style = theme => ({
mainNav: {
marginLeft: '-80px',
'& .menu-wrap': {
position: 'relative',
zIndex: 9
'& .logo': {
marginLeft: '20px'
View momoo.jsx
import { PureComponent, createRef, cloneElement } from 'react'
import Link from 'next/link'
import injectSheet, { withTheme } from 'react-jss'
import PropTypes from 'prop-types'
import Grid from 'components/Grid'
import LogoFull from 'static/svg/logo-full.svg'
import HamburgerFull from 'static/icons/hamburger-full.svg'
import Close from 'static/icons/close.svg'
ivandoric / gist:e4e46294c4d35eac0ec8
Created Jun 5, 2014
wordpress: create custom reset password page
View gist:e4e46294c4d35eac0ec8
<?php //Add all of this tu custom page template ?>
global $wpdb;
$error = '';
$success = '';
// check if we're in reset form
if( isset( $_POST['action'] ) && 'reset' == $_POST['action'] )
ivandoric / settings.json
Created Apr 28, 2019
Sublime Text 3 - config
View settings.json
"always_show_minimap_viewport": true,
"atomic_save": false,
"auto_indent": true,
ivandoric / gulpfile.js
Created Apr 28, 2019
PatternLab setup with Scss support
View gulpfile.js
/** ****************************************************
* The gulp wrapper around patternlab-node core, providing tasks to interact with the core library and move supporting frontend assets.
***************************************************** */
let gulp = require('gulp'),
path = require('path'),
browserSync = require('browser-sync').create(),
sass = require('gulp-sass'),
argv = require('minimist')(process.argv.slice(2)),
ivandoric / gist:11215045
Created Apr 23, 2014
shell: SCP cheat sheet
View gist:11215045
Copy the file "foobar.txt" from a remote host to the local host
$ scp /some/local/directory
Copy the file "foobar.txt" from the local host to a remote host
$ scp foobar.txt
Copy the directory "foo" from the local host to a remote host's directory "bar"
$ scp -r foo
Copy the file "foobar.txt" from remote host "" to remote host ""
You can’t perform that action at this time.