Skip to content

Instantly share code, notes, and snippets.

🥑
I like avocados

Ryan Schumacher jrschumacher

🥑
I like avocados
View GitHub Profile
View dev.zone
$TTL 60
$ORIGIN dev.
@ 1D IN SOA localhost. root.localhost. (45 3H 15M 1W 1D)
1D IN NS localhost.
1D IN A 127.0.0.1
*.dev. 60 IN A 127.0.0.1
go.dev. 60 IN A 127.0.0.1
*.go.dev. 60 IN A 127.0.0.1
@jrschumacher
jrschumacher / slack-minimize-sidebar.css
Last active Jun 15, 2018
Slack minimized sidebar (stylish
View slack-minimize-sidebar.css
@media (max-width: 950px) {
.client_channels_list_container {
max-width: 100px;
transition: 0.5s;
}
.client_channels_list_container:hover {
max-width: 220px;
}
.client_channels_list_container .p-channel_sidebar {
max-width: 100px;
@jrschumacher
jrschumacher / build-and-deploy.sh
Last active Apr 23, 2019
Ionic Automated Build and Deploy to HockeyApp
View build-and-deploy.sh
#!/bin/bash
PROJECT_NAME=MyApp
SCHEME_NAME=MyApp
STARTTIME=$(date +%s);
set -e
set -x
### Install dependencies
echo "--- Install dependencies [Time Elapsed $(($(date +%s) - $STARTTIME))s]"
@jrschumacher
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)
}
View Keybase.md

Keybase proof

I hereby claim:

  • I am jrschumacher on github.
  • I am beardedhen (https://keybase.io/beardedhen) on keybase.
  • I have a public key ASC6OdQnn5OuoVqiF7xdoRF4GqkBKFQC7t655cKNzUluewo

To claim this, I am signing this object:

@jrschumacher
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
socket.broadcast.to(channel).emit('new-message', payload);
// Send new message to user
@jrschumacher
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 (
<VirtruProvider>
<SocketIOProvider>
You can’t perform that action at this time.