Skip to content

Instantly share code, notes, and snippets.

Ivan Dorić ivandoric

View GitHub Profile
@ivandoric
ivandoric / .htaccess
Last active Jun 15, 2020
.htaccess file for video tutorial about deploying Node apps to shared hosting. Checkout the video: https://www.youtube.com/watch?v=ebWJbbUT4TA
View .htaccess
RewriteEngine On
RewriteRule ^$ http://127.0.0.1:8080/ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ http://127.0.0.1:1337/$1 [P,L]
@ivandoric
ivandoric / routes.php
Last active Mar 1, 2020
Creating reservation and sending mail example through the routes with JWT in OctoberCMS
View routes.php
Route::middleware(['api', 'jwt.auth'])->group(function () {
Route::post('create-reservation', function(Request $request) {
$reservation = new Reservation;
$reservation->pickup = $request->pickup;
$reservation->dropoff = $request->dropoff;
$reservation->user_id = $request->user_id;
$reservation->vehicle_id = $request->vehicle_id;
$reservation->save();
$user = \RainLab\User\Models\User::where('id', '=', $request->user_id)->first();
@ivandoric
ivandoric / gulpfile.js
Last active Mar 24, 2020
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: https://www.youtube.com/watch?v=ZL7mKFQHSAY
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
ivandoric / steam.md
Created Jun 19, 2019 — forked from graffic/steam.md
Downloading steam games from another computer/faster line
View steam.md

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.

Approach

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

Downloading

  1. Install it
  2. Open it and loging with your username and password: login username password
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
ivandoric / wl-api.php
Last active Jun 15, 2020
Creating WordPress Rest API Custom Endpoints Video Tutorial Note. - Check out the video: https://www.youtube.com/watch?v=C2twS9ArdCI
View wl-api.php
<?php
/**
* Plugin Name: Custom API
* Plugin URI: http://chrushingit.com
* Description: Crushing it!
* Version: 1.0
* Author: Art Vandelay
* Author URI: http://watch-learn.com
*/
@ivandoric
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,
"binary_file_patterns":
[
"**/images/*",
".sass-cache/*",
"PatternLab-UDG-Draft/*",
"PatternLab-new/public/*",
@ivandoric
ivandoric / gulpfile.js
Created Apr 28, 2019
PatternLab setup with Scss support
View gulpfile.js
/** ****************************************************
* PATTERN LAB NODE
* EDITION-NODE-GULP
* 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)),
View html
<!-- zelim -->
<section class="zelim-wrap">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-7">
<h2 class="futuraBook title">Najpopularni mobiteli na pretplatu</h2>
</div>
<div class="col-xs-12 col-sm-5 text-right hidden-xs">
<a href="#" class="btn btn-default btn-lg text-upper btn-svi-uredjaji">Svi mobiteli</a>
You can’t perform that action at this time.