Skip to content

Instantly share code, notes, and snippets.

View danhawkins's full-sized avatar

Danny Hawkins danhawkins

View GitHub Profile
@pjlamb12
pjlamb12 / compodoc.js
Last active September 14, 2020 12:42
Generate Compodoc Documentation for each App and Library in an Nx workspace from a script
const angularJson = require('./angular.json');
const exec = require('child_process').exec;
const fs = require('fs');
const mainProjects = Object.keys(angularJson.projects).filter(proj => !proj.includes('e2e'));
const tsConfigPaths = parseTsconfigPaths();
function parseTsconfigPaths() {
const pathsArray = [];
for (const projectName of mainProjects) {
@tutts
tutts / notes.md
Last active March 28, 2017 16:54
React London 2017

React London 2017

slideo.com - reactlondon2017

Prettier

Opinionated code formatting

Perude devs to incorporate into existing apps, not force them

@davejlong
davejlong / README.md
Last active March 28, 2017 04:49
Forecast widget and job for Kitto

Forecast Widget and Job Powered By Forecast.io

This package includes a job to pull forecasts from the Forecast.io API and a widget to display the forecast information.

Install

  1. Install into your dashboard with mix kitto.install --gist 229b76b15eae45ee9f5cc1e5d62a40eb
  2. Register for a DarkSky API key and set it into your applications environment in config/config.exs:
@OlegIlyenko
OlegIlyenko / Event-stream based GraphQL subscriptions.md
Last active July 4, 2024 07:31
Event-stream based GraphQL subscriptions for real-time updates

In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.

Conceptual Model

At the moment GraphQL allows 2 types of queries:

  • query
  • mutation

Reference implementation also adds the third type: subscription. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.

@mikechau
mikechau / 00_README.md
Last active May 19, 2024 13:34
Logging Rails 4 to Syslog, formatted w/ Logstash

Logging Rails 4 to Syslog, formatted w/ Logstash

Getting Started

Steps to get Rails 4 saving its output to Syslog via Rsyslog. This assumes you are on CentOS, but should be pretty adaptable to any other distribution. Ruby 2.0+ is also required.

  1. Add the gems lograge and logstash-event to your Gemfile. Feel free to remove from production if you'd like to test it in development as well or something.
  2. Update production.rb with the lograge settings and set the logger to Syslog::Logger.
  3. Add the conf files to /etc/rsyslog.d/. /etc/rsyslog.conf should have $IncludeConfig /etc/rsyslog.d/*.conf enabled, so it will load any additional configs from /etc/rsyslog.conf.