Skip to content

Instantly share code, notes, and snippets.

View gorangajic's full-sized avatar

Goran Gajic gorangajic

View GitHub Profile
{
"info": {
"title": "API interface for jobZology",
"version": "1.0.0",
"description": "## API REFERENCE\n\nThe jobZology/PathWay API is organized around REST, is designed to have predictable resource-oriented URLs.\nUses standard HTTP response codes, authentication, and verbs which can be understood by any HTTP client\nOur API mostly talks JSON. Only in some cases like image upload we use form-encoded for request bodies.\nCross-origin resource sharing is supported to allow you to interact securely with the API from a client-side web application.\n\n## Authentication:\n\n\nWhen accessing the API, the right credentials should be used. We use the HTTP built-in mechanism of sending an Authorization header that contains an access token.\n\n```\nAuthToken: <YOUR_TOKEN>\n```\n\nThe token can be obtained using authentication routes like login and signup or using LTI and ADFS authentication providers.\nAn authentication token is received from `AuthToken` responses header and it's updated on every reques
04352d00db63926007511a091908576771b90ee4646e3d0037262c52b53dd56307d811ed7eb434258e9a67c377f8a6d4aee11e84db1730e19a5e43b3a04cb42ecf
import React from 'react';
const Hit = ({ component: Component }) => <Component />;
const Miss = ({ component: Component }) => <Component />;
Hit.propTypes = Miss.propTypes = {
component: React.PropTypes.any,
};
const HitMiss = ({ children }) => {
[alias]
deleted = !git status -s | grep ‘ D ‘ | awk ‘{print $2}’
modified = !git status -s | grep ‘ M ‘ | awk ‘{print $2}’
notadded = !git status -s | grep ‘??’ | awk ‘{print $2}’
changed = !git status -s | awk ‘{print $2}’ | grep -v ‘^$’
@gorangajic
gorangajic / slugify.bash
Last active April 4, 2022 23:11 — forked from srdjanmarjanovic/slugify.bash
Useful script for naming branches for Git flow
#!/bin/bash
slugify() {
type="$1"
title="$2"
max_length="${3:-150}"
slug="$({
tr '[A-Z]' '[a-z]' | tr -cs '[[:alnum:]]' '-'
} <<< "$title")"
@gorangajic
gorangajic / es6-spread-immutable-cheatsheet.md
Last active April 11, 2024 08:32
es6 spread immutable cheatsheet

update object

var state = {
    id: 1,
    points: 100,
    name: "Goran"
};

var newState = {