Skip to content

Instantly share code, notes, and snippets.

View opejovic's full-sized avatar
:octocat:
Work in progress

Ognjen opejovic

:octocat:
Work in progress
View GitHub Profile
@opejovic
opejovic / InspiredGitHub.tmTheme
Last active April 7, 2019 11:36
Slightly modified InspiredGitHub Theme. Changed the background color to grey instead of the white, so it's easier on the eyes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Inspired GitHub Color Scheme for Sublime Text 3
Copyright 2015 Seth Lopez
Released under the MIT License <http://opensource.org/licenses/MIT>
https://github.com/sethlopezme/InspiredGitHub.tmtheme
-->
<plist version="1.0">
<dict>
@opejovic
opejovic / vue.sublime-snippet
Created May 3, 2019 19:45
Vue Component Snippet for Sublime
<snippet>
<content><![CDATA[
<template>
${0}
</template>
<script>
export default {
props: [${1}],
data() {
return {
@opejovic
opejovic / InspiredGitHub.tmTheme
Last active May 26, 2019 08:34
Moderately modified original InspiredGitHub.tmTheme. Use with SF Mono font.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
Inspired GitHub Color Scheme for Sublime Text 3
Copyright 2015 Seth Lopez
Released under the MIT License <http://opensource.org/licenses/MIT>
https://github.com/sethlopezme/InspiredGitHub.tmtheme
-->
<plist version="1.0">
<dict>
@opejovic
opejovic / Errors.js
Last active June 23, 2019 18:06
Vue-Forms: Errors
class Errors {
/**
* Create a new Errors instance.
*/
constructor() {
this.errors = {};
}
/**
@opejovic
opejovic / Form.js
Last active June 23, 2019 18:15
Vue-Forms: Form.js
class Form {
/**
* Create a new Form instance.
*
* @param {object} data
*/
constructor(data) {
this.originalData = data;
for (let field in data) {
.custom-pretty-btn {
background-color: transparent;
border: 0;
font-weight: 500;
font-size: 13px;
padding: 7px 14px;
color: rgb(94, 41, 153);
display: inline-block;
text-transform: uppercase;
letter-spacing: 1px;
.google-like-btn {
border-radius: 4px;
border: 0;
font-weight: 500;
font-size: 14px;
letter-spacing: 0.25px;
line-height: 36px;
padding: 0px 24px;
display: inline-block;
cursor: pointer;
@opejovic
opejovic / Paginator.vue
Created November 27, 2019 20:44
TailwindCSS and Vue paginator with Laravel backend
<template>
<div class="flex items-center" v-if="paginationExists()">
<!-- previous -->
<div class="cursor-pointer" @click="prev()">
<svg class="w-4 h-4 text-gray-600 fill-current" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
<path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20v-2z"/>
</svg>
</div>
<!-- pages -->
<template>
<div class="small">
<div v-if="datacollection !== null">
<!-- Stat cards -->
<div class="row justify-content-center">
<div class="col-md-2 m-1">
<div
class="statcard statcard-primary statcard-shadow px-2 py-1"
>
<h5 class="statcard-number">
<?php
namespace App\Utilities;
use Carbon\Carbon;
use App\ApiRequest;
use Illuminate\Pagination\LengthAwarePaginator;
trait PreparesApiActivityData
{