Skip to content

Instantly share code, notes, and snippets.

@gitKrystan
gitKrystan / README.md
Last active November 7, 2023 18:43
ember-cli-mirage types

Skylight ember-cli-mirage Types

These types were written by the team at https://www.skylight.io/, specifically @gitKrystan (with lots of help from @chancancode).

Gist filenames don't allow slashes, so I replaced them with :.

Before you start

Add "<app-name>/mirage/*": ["mirage/*"] to your paths config in your tsconfig.json

@david0
david0 / reaper-update.sh
Last active January 15, 2021 08:34
Reaper update script
#!/bin/sh
#RESPONSE=`curl -s https://www.landoleet.org/`
ping -c1 google.de || exit -1
NEWVERISON=6.`~/bin/reaper-download-url|grep -o '/reaper[^>]*_linux_x86_64.tar.xz'|tail -1|cut -c9-| cut -d_ -f1`
cd ~/aur/reaper
git reset --hard origin/master
@cferdinandi
cferdinandi / README.md
Created October 15, 2020 15:45
A vanilla JS fork of Lettering.js
import React, {Component} from 'react';
import IncrementerPresenter from './IncrementerPresenter';
export default class IncrementerContainer extends Component {
constructor(props){
super(props);
this.state = {count: 0};
this.increment = this.increment.bind(this)
}
increment(){
this.setState((currState) => ({count: currState.count + 1}));
@igorbenic
igorbenic / allowedBlocks.js
Last active July 20, 2020 21:39
How to enable Inner Blocks in your Gutenberg Block | https://ibenic.com/enable-inner-blocks-gutenberg
<InnerBlocks allowedBlocks={ [ 'core/image', 'core/paragraph' ] } />
@churro-s
churro-s / LetsEncrypt_HTTPS_plex.MD
Last active February 25, 2024 11:52
Setup Let's Encrypt certificate for use with Plex Media Server on Ubuntu
@BrianSipple
BrianSipple / ember-addon-essentials.md
Last active April 17, 2017 18:27
Ember Addon Essentials -- A checklist of some of the finer details to keep in mind when developing Ember addons

Ember Addon Essentials

This document is meant to be a brief "checklist" of things to setup for your Ember addon when beginning development in order to have the best possible architecture and workflow out of the gate. For more comprehensive material, the following are bookshelf-caliber:

Filling out package.json

@datchley
datchley / app.js
Last active September 20, 2022 01:22
"Getting Functional with Javascript" Blog post source files
/**
* Primary application logic for our Functional Programming blog example
* See related blog series at: http://www.datchley.name/tag/functional-programming/
* Version: 2.0
*/
// A simple, resuable comparison for '>='
function greaterThanOrEqual(a, b) {
return a >= b
}
@paulirish
paulirish / bling.js
Last active February 20, 2024 14:11
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@jamesarosen
jamesarosen / ember-data-notes.md
Last active October 9, 2016 17:55
Ember-Data Relationships and Legacy APIs

This post is one in a series on converting a Backbone app to Ember. See also Ember-Data Notes.

Recently, our team has been trying to get Ember-Data to work with an API that does not conform to the json:api standard. The experience has been mostly good, but we've really struggled with the relationships. We have a Customer model that has many pastInvoices and a single monthToDateInvoice. The URL for past invoices is /billing/invoice?explicit_customer_id={{customerId}}; for month-to-date, it's /billing?no_list=true&explicit_customer_id={{customerId}}. The JSON that the API returns for a customer does not include any link to those URLs.

First Attempt: InvoiceAdapter

Our first attempt was to create an InvoiceAdapter that understood how to fetch invoices from those URLs:

// app/billing/invoices/adapter.js: