Skip to content

Instantly share code, notes, and snippets.

View KevinTCoughlin's full-sized avatar

Kevin T. Coughlin KevinTCoughlin

View GitHub Profile
@KevinTCoughlin
KevinTCoughlin / rss.opml
Created October 4, 2020 22:58 — forked from paulriley/rss.opml
RSS Feeds
<?xml version="1.0"?>
<opml version="1.1">
<head>
<title>Riley's Feeds</title>
</head>
<body>
<outline type="rss" text="Smodcast" xmlUrl="http://smodcast.com/channels/smodcast/feed/" title="Smodcast" />
<outline type="rss" text="Hollywood Babble-On" xmlUrl="http://smodcast.com/channels/hollywood-babble-on/feed/" title="Hollywood Babble-On" />
<outline type="rss" text="Tell 'em Steve-Dave" xmlUrl="http://smodcast.com/channels/tell-em-steve-dave/feed/" title="Jay and Silent Bob Get Old" />
<outline type="rss" text="I Sell Comics" xmlUrl="http://smodcast.com/channels/i-sell-comics/feed/" title="I Sell Comics" />
@KevinTCoughlin
KevinTCoughlin / LICENSE
Created July 3, 2019 04:20 — forked from noelbundick/LICENSE
Exclude WSL installations from Windows Defender realtime protection
MIT License
Copyright (c) 2018 Noel Bundick
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@KevinTCoughlin
KevinTCoughlin / profile.json
Last active July 1, 2019 03:56 — forked from shanselman/profile.json
Windows Terminal Profile
{
"globals" :
{
"alwaysShowTabs" : true,
"defaultProfile" : "{78e390db-1bff-4533-9d7c-20f53d8bafa1}",
"initialCols" : 120,
"initialRows" : 30,
"keybindings" :
[
{
@KevinTCoughlin
KevinTCoughlin / React.unstable_Profiler.md
Created June 19, 2019 23:03 — forked from bvaughn/React.unstable_Profiler.md
Notes about the in-development React <Profiler> component

Profiler

React 16.4 will introduce a new Profiler component (initially exported as React.unstable_Profiler) for collecting render timing information in order to measure the "cost" of rendering for both sync and async modes.

Profiler timing metrics are significantly faster than those built around the User Timing API, and as such we plan to provide a production+profiling bundle in the future. (The initial release will only log timing information in DEV mode, although the component will still render its children- without timings- in production mode.)

How is it used?

Profiler can be declared anywhere within a React tree to measure the cost of rendering that portion of the tree. For example, a Navigation component and its descendants:

@KevinTCoughlin
KevinTCoughlin / renameProp.ts
Created April 11, 2019 03:21 — forked from jdhuntington/renameProp.ts
rename a prop for OUFR
import ts from 'typescript';
import { migration } from '../../migration';
import { mod } from 'riceburn';
const inFooJsxTag = (node: ts.Node): boolean => {
if (!node) {
return false;
}
if (ts.isJsxSelfClosingElement(node) || ts.isJsxOpeningElement(node)) {
const tagName = node.tagName;
@KevinTCoughlin
KevinTCoughlin / package-json-build-number.ps1
Last active August 7, 2020 05:43 — forked from ediblecode/package-json-build-number.ps1
PowerShell Parse & Print version value from package.json
$version = (Get-Content package.json) -join "`n" | ConvertFrom-Json | Select -ExpandProperty "version"
Write-Host "Version: '$version']"
@KevinTCoughlin
KevinTCoughlin / async.js
Created September 22, 2018 07:21 — forked from up1/async.js
NodeJS with Async/Await
var fetch = require('node-fetch')
async function getDataFromAPI() {
let response = await fetch("https://api.github.com/users/up1")
let data = await response.json()
console.log(JSON.stringify(data, null, "\t"))
}
getDataFromAPI()
--log_gc (Log heap samples on garbage collection for the hp2ps tool.)
type: bool default: false
--expose_gc (expose gc extension)
type: bool default: false
--max_new_space_size (max size of the new generation (in kBytes))
type: int default: 0
--max_old_space_size (max size of the old generation (in Mbytes))
type: int default: 0
--max_executable_size (max size of executable memory (in Mbytes))
type: int default: 0
@KevinTCoughlin
KevinTCoughlin / gist:80e4094cbf092e102208289ec4455120
Created September 20, 2017 03:26
Walmart Mobile node.js Setup

Overview

We run multiple server processes in two data centers. Each process listens on two ports, one for HTTP and one for HTTPS. HTTPS is terminated by Apache prior to reaching node.js. HTTP goes directly from the client to node.js (through a master load balancer). We do not use clusters. We slice our physical servers into thin virtual machines running SmartOS, each with about 3GB of memory designed for a single node.js process.

Our node.js servers are hapi.js servers using the composer functionality and plugins architecture. We have three sets of plugins loaded: mobile web front end experience (single page app), legacy API reverse proxy, and monitoring.

We also serve original node.js services off another server zone which runs closed source plugins using hapi.

Analytics

@KevinTCoughlin
KevinTCoughlin / README.md
Created July 30, 2017 02:51 — forked from vanto/README.md
OEmbed Liquid Tag for Jekyll

OEmbed Liquid Tag for Jekyll

This is a simple liquid tag that helps to easily embed images, videos or slides from OEmbed enabled providers. It uses Magnus Holm's great oembed gem which connects to the OEmbed endpoint of the link's provider and retrieves the HTML code to embed the content properly (i.e. an in-place YouTube player, Image tag for Flickr, in-place slideshare viewer etc.). By default it supports the following OEmbed providers (but can fallback to Embed.ly or OoEmbed for other providers):

  • Youtube
  • Flickr
  • Viddler
  • Qik
  • Revision3
  • Hulu
  • Vimeo