Skip to content

Instantly share code, notes, and snippets.


Ivan Dorić ivandoric

View GitHub Profile
ivandoric / add-movies.jsx
Last active December 19, 2022 11:22
Frontend code for adding data to Directus using Flows - video tutorial can be found here:
View add-movies.jsx
// Check the video for more info:
import React, {useEffect, useState} from 'react';
import Papa from "papaparse";
const AddMovies = () => {
const [moviesList, setMoviesList] = useState([])
const handleSubmit = (e) => {
ivandoric / [id].jsx
Last active February 28, 2023 12:42
Code used in video - [Next + Strapi - Internationalization](
View [id].jsx
import Link from "next/link";
import { useRouter } from "next/router";
function Page({ content }) {
const router = useRouter();
return (
<div className="container">
ivandoric / all.tsx
Created May 30, 2021 09:28
Infinite Scroll And Filters With React Query
View all.tsx
import Container from "components/ui/Container"
import VideoCard from "components/VideoCard"
import fetchData from "helpers/fetchData"
import { useEffect, useState, Fragment, useRef } from "react"
import { useInfiniteQuery } from "react-query"
import useIntersectionObserver from "../hooks/useIntersectionObserver"
import Select from "react-select"
import { useUIDSeed } from "react-uid"
import { useRouter } from "next/router"
import Seo from "components/Seo"
ivandoric / index.php
Last active May 23, 2023 19:23
WordPress Rest API Add Posts From Frontend (Video Tutorials Notes) - Check out the video:
View index.php
<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="<?php echo get_template_directory_uri() ?>/style.css">
<title>Watch Learn Theme</title>
<h1>Hello World</h1>
ivandoric / wl-api.php
Created October 5, 2020 09:17
WordPress Rest API Custom Filters (Video Tutorials Notes) - Check out the video:
View wl-api.php
* Plugin Name: Custom API
* Plugin URI:
* Description: Crushing it!
* Version: 1.0
* Author: Art Vandelay
* Author URI:
ivandoric / javascriptreact.json
Created September 13, 2020 08:35
Snippet for bootstraping react component, as seen in this video:
View javascriptreact.json
"Bootstrap Component": {
"prefix": "comp",
"body": [
"import { Box } from 'reflexbox'",
"import styled from '@emotion/styled'",
"function $1() {",
" return (",
" <$1Styled>",
ivandoric / .htaccess
Last active June 27, 2022 09:51
.htaccess file for video tutorial about deploying Node apps to shared hosting. Checkout the video:
View .htaccess
RewriteEngine On
RewriteRule ^$ [P,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$$1 [P,L]
ivandoric / routes.php
Last active March 1, 2020 10:00
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;
$user = \RainLab\User\Models\User::where('id', '=', $request->user_id)->first();
ivandoric / gulpfile.js
Last active September 18, 2022 18:14
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 June 19, 2019 07:21 — 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