Skip to content

Instantly share code, notes, and snippets.

View drschwabe's full-sized avatar

Derrick Schwabe drschwabe

View GitHub Profile
@drschwabe
drschwabe / solarSystem.js
Created January 11, 2020 19:45
JavaScript type checking
const _ = require('underscore')
const solarSystem = (...args) => {
let planet, asteroids, satellite, spaceJunk, isFake
args.forEach(arg => {
if(_.isArray(arg)) return asteroids = arg
if(_.isObject(arg)) return planet = arg
if(_.isString(arg)) return satellite = arg
if(_.isNumber(arg)) return spaceJunk = arg
if(_.isBoolean(arg)) return isFake = arg
@drschwabe
drschwabe / 01-installing-linux-on-eurocom-q6.md
Last active December 26, 2018 05:08 — forked from Brainiarc7/01-installing-linux-on-eurocom-q6.md
Installing Ubuntu 18.04LTS on the Eurocom Q6, among other tweaks.

Installing Linux on the Eurocom Q6:

For starters,

If you are dual booting, install Windows first, and partition from there with a tool such as Minitool. You'll only need two partitions, one for root and optionally, a small one for swap (say, 8GB). Partition them as appropriate, and when done, reboot into the UEFI menu and ensure that:

(a). Secure boot is disabled (otherwise you won't be able to load up proprietary drivers needed for the Nvidia GPU).

(b). Confirm that you're booting in UEFI mode ONLY. This is the default. CSM should remain disabled. Here's why.

@drschwabe
drschwabe / package.json
Last active June 22, 2021 22:20
Watchify (Browserify) a JS file that has modules loading in both Common ('require') and ES6 ('import ... from ')
{
"name": "my-app-using-require-and-imports-same-codebase",
"scripts": {
"watch": "./node_modules/.bin/watchify client.js -t [ babelify --global --sourceType unambiguous --presets ['@babel/preset-env' ] ] -o client.bundle.js -d -v",
"compile": "./node_modules/.bin/browserify client.js -t [ babelify --global --sourceType unambiguous --presets ['@babel/preset-env' ] ] -o client.bundle.js",
"compress": "./node_modules/.bin/uglifyjs client.bundle.js --compress --mangle -o client.bundle.js",
"start": "node server.js"
},
"devDependencies": {
"@babel/polyfill": "^7.4.4",
git clone
git status //< Check to see if git has acknowledged your modifications.
git diff //< See what you've changed
git add .
(or git add -u if you removed files)
git commit -m "Your commit message"
git log //< Verify your commit is applied.
git push
git pull //< For later, if someone else pushed commits