Skip to content

Instantly share code, notes, and snippets.

View RavenHursT's full-sized avatar
💭
Currently Job Searching. Please reach out if you might have something!

Matthew Marcus RavenHursT

💭
Currently Job Searching. Please reach out if you might have something!
View GitHub Profile
@RavenHursT
RavenHursT / pgtools-drop-create.js
Created July 24, 2017 18:54
Using pgtools to drop/create a database
import pgtools from 'pgtools'
import CONFIG from './db-config.json'
function handleDropErrors (err) {
console.dir(err.message.indexOf(`does not exist`), {colors: true, depth: 3})
if (err.message.indexOf(`does not exist`) === -1) {
throw(err)
} else {
console.log(`got here`, err)
createDb()
@RavenHursT
RavenHursT / request-promise.min.js
Last active July 19, 2017 00:47
Browserfied/minified Request-Promise
This file has been truncated, but you can view the full file.
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){},{}],2:[function(require,module,exports){var asn1=exports;asn1.bignum=require("bn.js");asn1.define=require("./asn1/api").define;asn1.base=require("./asn1/base");asn1.constants=require("./asn1/constants");asn1.decoders=require("./asn1/decoders");asn1.encoders=require("./asn1/encoders")},{"./asn1/api":3,"./asn1/base":5,"./asn1/constants":9,"./asn1/decoders":11,"./asn1/encoders":14,"bn.js":18}],3:[function(require,module,exports){var asn1=require("../asn1");var inherits=require("inherits");var api=exports;api.define=function define(name,bod
@RavenHursT
RavenHursT / js-phonescreen-questions.js
Last active August 12, 2022 22:22
Questions for JavaScript phone screen
//What does this do? What is it called? What is it typically used for?
(function () {
// Code
})();
//What does this do and what does it output?
function Obj() {
this.foo = "FOO"
this.func = function () {
var self = this
@RavenHursT
RavenHursT / Useless Comcast chat.txt
Created February 11, 2016 04:24
My wasted 1hr chat attempting to get a simple question answered with Comcast.
chat id: c6854912-744a-4fd0-9fe5-e8d9a2bf4267
Problem: Gateway won't go online
MD > Hello Matthew_, Thank you for contacting Comcast Live Chat Support. My name is MD. Please give me one moment to review your information.
MD > Hello!
Matthew_ > My Issue: Gateway won't go online
MD > I apologize for the inconvenience. I will do my best to address your concern today.
Matthew_ > I'm doing self install.. Your instructions say lights can blink for up to 20min.. I've waited longer..
Matthew_ > I don't think Comcast has come out to the connection at the street, like they were supposed to by now.. I'm still getting ATT Uverse TV service through the coax..
Matthew_ > Can you check to see if they've made the switch yet please?
Matthew_ > Hello??
@RavenHursT
RavenHursT / flummox.min.js
Created January 12, 2016 08:09
flummoxJS minified
!function t(e,n,i){function r(o,a){if(!n[o]){if(!e[o]){var c="function"==typeof require&&require;if(!a&&c)return c(o,!0);if(s)return s(o,!0);var h=new Error("Cannot find module '"+o+"'");throw h.code="MODULE_NOT_FOUND",h}var u=n[o]={exports:{}};e[o][0].call(u.exports,function(t){var n=e[o][1][t];return r(n?n:t)},u,u.exports,t,e,n,i)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<i.length;o++)r(i[o]);return r}({1:[function(t,e,n){function i(){if(!a){a=!0;for(var t,e=o.length;e;){t=o,o=[];for(var n=-1;++n<e;)t[n]();e=o.length}a=!1}}function r(){}var s=e.exports={},o=[],a=!1;s.nextTick=function(t){o.push(t),a||setTimeout(i,0)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=r,s.addListener=r,s.once=r,s.off=r,s.removeListener=r,s.removeAllListeners=r,s.emit=r,s.binding=function(t){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(t){throw new Error("process.chdir is not supported")},s.umask=function(){return
@RavenHursT
RavenHursT / express-response-timeout.js
Created July 14, 2015 23:50
ExpressJS: Setting Response timeout example
//Server
var
express = require('express'),
serve = express(),
interval = null;
serve.get('/test-connection-length', function (req, res) {
res.setTimeout(15000, function(){
clearInterval(interval);
@RavenHursT
RavenHursT / url-extract-root-domain.js
Created February 23, 2015 22:58
Javascript extract root domain from URL
var extractRootDomain = function(url){
return url.match(/^https?\:\/\/([^\/?#]+)(?:[\/?#]|$)/i)[1].split('.').slice(-2).join('.');
};
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 300;
src: local('Open Sans Light'), local('OpenSans-Light'), url('../fonts/opensans/opensans-light.woff') format('woff');
}
@font-face {
font-family: 'Open Sans';
font-style: normal;
font-weight: 400;
@RavenHursT
RavenHursT / .bash_aliases
Last active April 6, 2018 19:41
.bash_aliases
alias cp='cp -iv' # Preferred 'cp' implementation
alias mv='mv -iv' # Preferred 'mv' implementation
alias mkdir='mkdir -pv' # Preferred 'mkdir' implementation
alias ll='ls -FGlAhp' # Preferred 'ls' implementation
alias less='less -FSRXc' # Preferred 'less' implementation
cd() { builtin cd "$@"; ll; } # Always list directory contents upon 'cd'
alias cd..='cd ../' # Go back 1 directory level (for fast typers)
alias ..='cd ../' # Go back 1 directory level
alias ...='cd ../../' # Go back 2 directory levels
alias .3='cd ../../../' # Go back 3 directory levels
@RavenHursT
RavenHursT / .bash_profile
Last active April 9, 2018 18:21
Mac OSX .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management