Skip to content

Instantly share code, notes, and snippets.


Ryan Schumacher jrschumacher

View GitHub Profile
jrschumacher / __Tagged Template Literal To
Last active Aug 1, 2020
Tagged template literal helper to regenerate the string
View __Tagged Template Literal To
title tags date
Using template tags for simple logging
tags, javascript, logging

Tagged template literal helper which regenerates the string

Often times I've wanted to utilize Tagged Template Literals to make writing logs super easy. This has often alluded me due to the structure of tags.

jrschumacher / virtru-secchat-app.js
Last active Jan 21, 2020
Virtru Secure Chat 2/3: Application Bootstrap
View virtru-secchat-app.js
import React from 'react';
import { ClientSocket as SocketIOProvider } from 'use-socketio';
import { VirtruProvider } from '../hooks/useVirtru';
import AuthenticationModal from '../components/authenticationModal';
import Room from '../components/room';
function App() {
return (
jrschumacher / virtru-secchat-server.js
Created Jan 21, 2020
Virtru Secure Chat 2/3: Application Bootstrap
View virtru-secchat-server.js
try {
const user = socket.nickname;
if (!user) throw new Error('Your session is not registered. Please make sure to login.');
const response = await pouchDB.addMessage(channel, message, user);
const payload = { ...response, message, user };
// Send ok response
socket.emit('add-message-ok', response);
// Broadcast message to room'new-message', payload);
// Send new message to user

Keybase proof

I hereby claim:

  • I am jrschumacher on github.
  • I am beardedhen ( on keybase.
  • I have a public key ASC6OdQnn5OuoVqiF7xdoRF4GqkBKFQC7t655cKNzUluewo

To claim this, I am signing this object:

jrschumacher / terser.js
Last active Jul 13, 2019
A terser script to minify all javascript files in a directory
View terser.js
const fs = require('fs')
const {sync: globSync} = require('glob')
const filesize = require('filesize')
const Terser = require('terser')
const options = require(process.env.TERSER_CONFIG || './terserrc.json')
const getSize = (file) => {
const {size} = fs.statSync(file)
return filesize(size)
jrschumacher /
Last active Apr 23, 2019
Ionic Automated Build and Deploy to HockeyApp
STARTTIME=$(date +%s);
set -e
set -x
### Install dependencies
echo "--- Install dependencies [Time Elapsed $(($(date +%s) - $STARTTIME))s]"
$TTL 60
$ORIGIN dev.
@ 1D IN SOA localhost. root.localhost. (45 3H 15M 1W 1D)
1D IN NS localhost.
*.dev. 60 IN A 60 IN A
* 60 IN A
nativefier \
--name "Pivotal Tracker" \
--platform "darwin" \
--overwrite \
--icon ~/.nativefier/pivotal_tracker/icon.png \
"" \
View test_php_skill.php
* Created this test for job interviews. *
* Directions
* Read the direction in the Q and respond below A.
View headjs.min.js.cached
(function(n,t){"use strict";function r(n){a[a.length]=n}function k(n){var t=new RegExp(" \\b"+n+"\\b");c.className=c.className.replace(t,"")}function p(n,t){for(var i=0,r=n.length;i<r;i++),n[i],i)}function tt(){var t,e,f,o;c.className=c.className.replace(/ (w-|eq-|gt-|gte-|lt-|lte-|portrait|no-portrait|landscape|no-landscape)\d+/g,""),t=n.innerWidth||c.clientWidth,e=n.outerWidth||n.screen.width,u.screen.innerWidth=t,u.screen.outerWidth=e,r("w-"+t),p(i.screens,function(n){t>n?("gt-"+n),i.screensCss.gte&&r("gte-"+n)):t<n?("lt-"+n),i.screensCss.lte&&r("lte-"+n)):t===n&&(i.screensCss.lte&&r("lte-"+n),i.screensCss.eq&&r("e-q"+n),i.screensCss.gte&&r("gte-"+n))}),f=n.innerHeight||c.clientHeight,o=n.outerHeight||n.screen.height,u.screen.innerHeight=f,u.screen.outerHeight=o,u.feature("portrait",f>t),u.feature("landscape",f<t)}function it(){n.clearTimeout(b),b=n.setTimeout(tt,50)}var y=n.document,rt=n.navigator,ut=n.location,c=y.documentElement,a=[],i={screens:[240,320,480,
You can’t perform that action at this time.