Skip to content

Instantly share code, notes, and snippets.

View mstijak's full-sized avatar

Marko Stijak mstijak

View GitHub Profile
@mstijak
mstijak / WakeUpService.cs
Created June 6, 2022 10:48
WakeUpService class is very helpful for organizing background tasks.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
namespace StatusApp.Util;
public sealed class WakeUpService : IDisposable
name: Publish PRs in the Dev branch for preview
on:
pull_request:
types: [opened, labeled, synchronize, reopened]
jobs:
merge-dev:
if: contains(github.event.pull_request.labels.*.name, 'DEV')
runs-on: ubuntu-latest
steps:
import { computable } from 'cx/ui';
import { DataProxy, Icon } from 'cx/widgets';
export const KPI = ({ title, value, unit, icon, iconClass, change }) => (
<cx>
<div class="bg-white border p-6 rounded">
<Icon name={icon} class="block p-2 rounded-full w-10 h-10" className={iconClass} />
<div class="my-2 text-gray-600">{title}</div>
<div class="text-3xl font-bold leading-none" ws>
<span text={value} /> <span class="text-sm" text={unit} />
const NavItem = ({ text, href, tooltip, onClick, className, icon, badge, expanded }) => (
<cx>
<Link
href={href}
url-bind="url"
class="hover:bg-gray-100 flex items-center px-3 py-3 text-gray-600 relative font-semibold whitespace-nowrap text-opacity-70 text-[15px] border-l-[3px] border-transparent cursor-pointer"
className={className}
activeClass="!bg-blue-100 !border-blue-500 !text-blue-500 !opacity-100"
tooltip={tooltip}
onClick={onClick}
@mstijak
mstijak / styles.md
Last active May 22, 2019 12:13
CSS Code Style

CSS konvencije

Primjer komponente:

<header class="flex-row align-center">
  <ul class="navbar">
    <li class="primary navbar_item active">Home</li>
    <li class="navbar_item">Products</li>
 Resources
var babelHelpers = {};
babelHelpers.typeof =
typeof Symbol === "function" && typeof Symbol.iterator === "symbol"
? function (obj) {
return typeof obj;
}
: function (obj) {
return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype
? "symbol"
+:refs/heads/(*)
+:refs/(pull/*)/merge
+:refs/tags/v(*)
@mstijak
mstijak / error.js
Created November 13, 2016 21:49
Google Bot Crawl Debugging
window.onerror = function (message, url, lineNo, colNo, error) {
console.log(arguments);
let container = document.createElement('div');
container.style.color = 'red';
container.style.position = 'fixed';
container.style.background = '#eee';
container.style.padding = '2em';
@mstijak
mstijak / zip.bat
Last active January 12, 2020 20:02
7z update archive + remove deleted files
7z u Scripts.zip Scripts\*.sql -uq0