Skip to content

Instantly share code, notes, and snippets.

@jgornick
jgornick / jsonapi_oas.yml
Created June 2, 2021 20:49 — forked from naesean/jsonapi_oas.yml
OpenAPI 3.0 schemas that comply with the JSON:API 1.0 specification
JSONAPIObject:
description: Includes the current JSON:API version for this specification as well as optional meta information
type: object
required:
- version
properties:
version:
type: string
default: '1.0'
example: '1.0'
@jgornick
jgornick / gist:10059024
Last active March 18, 2017 11:07 — forked from jdauphant/gist:10023858
Ansible: Directory Structure
production/
ansible_hosts # inventory file for production servers
group_vars/
group1 # here we assign variables to particular groups for production
group2 # ""
host_vars/
hostname1 # if production systems need specific variables, put them here
hostname2 # ""
files/
#!/bin/bash
# Firefox Multifix
#
# Run this bash script from within the folder that contains your Firefox apps,
# and every Firefox app in the current folder will be modified to automatically
# launch using a version-named profile. For example, "Firefox 2.0.app" will use
# the "Firefox 2.0" profile, etc.
#
# Usage:
@jgornick
jgornick / screening.js
Created September 13, 2010 20:39 — forked from rmurphey/screening.js
JS: Interview Questions
// 1: how could you rewrite the following to make it shorter?
if (foo) {
bar.doSomething(el);
} else {
bar.doSomethingElse(el);
}
Answer:
bar[foo ? 'doSomething' : 'doSomethingElse'](el);
@jgornick
jgornick / FileCache.php
Created September 18, 2009 21:59 — forked from robzienert/gist:189307
ZF: Cache Configs
<?php
class Default_Controller_Action_Helper_FileCache extends
Zend_Controller_Action_Helper_Abstract
{
protected $_cache;
public function load($file, $id)
{
return $this->getCache($file)->load($id);
}