Skip to content

Instantly share code, notes, and snippets.

View snewell92's full-sized avatar
😺
Workin' and Livin'

Sean Newell snewell92

😺
Workin' and Livin'
View GitHub Profile
@snewell92
snewell92 / index.ts
Last active October 4, 2017 17:48
Micro Dev hangs
import { createTransport, SendMailOptions } from 'nodemailer';
import { IncomingMessage, ServerResponse } from 'http'
import { json, send } from 'micro';
type MicroFunction = (req: IncomingMessage, res: ServerResponse) => string | void | Promise<any>;
type DorianMailData = {
dest: string,
body: string,
@snewell92
snewell92 / .hyper.js
Created September 29, 2017 13:51
Hyper config
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// Choose either "stable" for receiving highly polished,
// or "canary" for less polished but more frequent updates
updateChannel: 'stable',
@snewell92
snewell92 / .circleci_config.yml
Created September 19, 2017 15:43
circle ci ssh
version: 2
jobs:
build:
docker:
- image: kyleondy/alpine-rsync
working_directory: ~/repo
steps:
- run:
name: list
command: ls -la ~/.ssh
@snewell92
snewell92 / app.js
Last active September 15, 2017 18:08
Failing ava test
/* TYPESCRIPT */
import * as path from 'path';
import * as favicon from 'serve-favicon';
import * as compress from 'compression';
import * as cors from 'cors';
import * as helmet from 'helmet';
import * as bodyParser from 'body-parser';
import * as cookieParser from 'cookie-parser';
import * as feathers from 'feathers';
@snewell92
snewell92 / hooks.js
Created September 13, 2017 20:13
$include or else
/* TYPESCRIPT */
import authentication = require('feathers-authentication');
let authenticate = authentication.hooks.authenticate;
import { OrderQueryParam, SequelizeOrder, filterOrder, filterLikeQueryParam, filterIncludeQueryParam } from '../index';
const isAuthenticated = authenticate('jwt');
export default {
@snewell92
snewell92 / error-log.err
Created August 23, 2017 19:37
MySQL installation after cinst mysql -y
2017-08-23T19:27:32.124039Z 0 [Warning] TIMESTAMP with implicit DEFAULT value is deprecated. Please use --explicit_defaults_for_timestamp server option (see documentation for more details).
2017-08-23T19:27:32.124039Z 0 [Note] --secure-file-priv is set to NULL. Operations related to importing and exporting data are disabled
2017-08-23T19:27:32.124039Z 0 [Note] MySQL (mysqld 5.7.18) starting as process 7572 ...
2017-08-23T19:27:32.124039Z 0 [Note] InnoDB: Mutexes and rw_locks use Windows interlocked functions
2017-08-23T19:27:32.124039Z 0 [Note] InnoDB: Uses event mutexes
2017-08-23T19:27:32.124039Z 0 [Note] InnoDB: _mm_lfence() and _mm_sfence() are used for memory barrier
2017-08-23T19:27:32.124039Z 0 [Note] InnoDB: Compressed tables use zlib 1.2.3
2017-08-23T19:27:32.124039Z 0 [Note] InnoDB: Number of pools: 1
2017-08-23T19:27:32.139682Z 0 [Note] InnoDB: Not using CPU crc32 instructions
2017-08-23T19:27:32.139682Z 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
@snewell92
snewell92 / ResponsiveService.js
Last active May 11, 2021 21:35
Angular Responsive Service
/* TYPESCRIPT */
import { Injectable } from '@angular/core';
@Injectable()
export class ResponsiveService {
constructor() {
window.onresize = this.callSubscribers
}
@snewell92
snewell92 / default.json
Last active July 7, 2017 19:38
authentication options
"authentication": {
"secret": "somereallylongstring",
"strategies": [
"local",
"jwt"
],
"path": "/authentication",
"service": "users",
"entity": "user",
"passReqToCallback": true,
@snewell92
snewell92 / package.json
Created June 28, 2017 14:39
AOT genDir repro
{
"name": "angular-aot-error",
"version": "1.0.0",
"description": "Test to repro genDir issue",
"main": "index.js",
"scripts": {
"build-jit": "tsc -p public/src",
"build-aot": "ngc -p public/src/tsconfig.aot.json"
},
"repository": {
@snewell92
snewell92 / authentication.ts
Last active July 23, 2023 11:35
Sample Feathers routing with express like a traditional semi-session option
import authentication = require('feathers-authentication');
const jwt = require('feathers-authentication-jwt');
const local = require('feathers-authentication-local');
const extractJWT = jwt.ExtractJwt;
import { Application } from 'feathers';
import { Request } from 'express';
// !! This service is different than the default.