Skip to content

Instantly share code, notes, and snippets.

Sean Lynch techniq

Block or report user

Report or block techniq

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View axis.d.ts
declare module '@vx/axis' {
import React from 'react';
import { ScaleTime } from 'd3-scale';
interface Point {
x: number;
y: number;
interface AxisProps {
techniq / index.js
Last active Apr 20, 2017
Get calendar days
View index.js
import dateFns from 'date-fns';
function getMonthDays(date) {
const startOfMonth = dateFns.startOfMonth(date);
const endOfMonth = dateFns.endOfMonth(date);
let prevMonthDaysNeeded = startOfMonth.getDay();
const prevMonthDays = prevMonthDaysNeeded ? dateFns.eachDay(
dateFns.subDays(startOfMonth, prevMonthDaysNeeded),
dateFns.subDays(startOfMonth, 1)

Keybase proof

I hereby claim:

  • I am techniq on github.
  • I am techniq ( on keybase.
  • I have a public key whose fingerprint is 4128 E489 262F 14C2 6C06 43DE EDE7 A77D 2F9B 9ABD

To claim this, I am signing this object:

techniq /
Last active Feb 18, 2016
Element prototype oddity in Chrome console

Element prototype oddity in Chrome console

Object.getPrototypeOf(document.createElementNS('html', 'div'))
  1. When I run this from a script on Chrome 48 (stable) or 50 (canary) I get the expected/desired HTMLDivElement (codepen)
  2. When I run this within the console on Chrome 48 I get Element (no HTMLDivElement or HTMLElement)
  3. When I run this within the console on Chrome 50 I get Node (no HTMLDivElement, HTMLElement, or Element)
techniq / examples.js
Last active Aug 29, 2015
Find all elements with a specific style attribute
View examples.js
View fakeServer-test.js
import JSData from 'js-data';
import DSHttpAdapter from 'js-data-http';
import sinon from 'sinon';
describe("fakeServer", function() {
beforeEach(function() {
this.server = sinon.fakeServer.create();
// this.server.autoRespond = true;
// this.respondImmediately = true;
techniq /
Last active Aug 29, 2015
Bash tips

Bash tips

Strip extension (source)

Example: foo.png => foo

for file in *.png; do
    echo $(basename $file .png)


techniq /
Last active Oct 3, 2018
Convert JSON boolean strings ("true"/"false") to boolean values

Convert undefined to false

JSON.parse(someVariable || false)


  • "true" => true
  • "false" => false
  • undefined => false
techniq /
Last active Aug 29, 2015
Gerber / KiCAD layer file extensions
KiCAD Layer Name Gerber Name Gerber Extension
F.Cu Top Layer .gtl
B.Cu Bottom Layer .gbl
F.Paste Top Paste .gtp
F.SilkS Top Overlay (silk screen) .gto
B.SilkS Bottom Overlay (silk screen) .gbo
F.Mask Top Solder Resist .gts
B.Mask Bottom Solder Resist .gbs
Edge.Cuts Edges (board outline) .gm1
techniq /
Last active Jul 13, 2019
curl reference

See response headers

curl -i localhost/api/foo

See request and response headers

curl -v localhost/api/foo

POST with string data


You can’t perform that action at this time.