Skip to content

Instantly share code, notes, and snippets.

View loganhenson's full-sized avatar

Logan Henson loganhenson

View GitHub Profile
@loganhenson
loganhenson / vim-heroku.sh
Created February 3, 2021 17:05 — forked from dvdbng/vim-heroku.sh
Run vim in heroku updated 2017
mkdir ~/vim
cd ~/vim
# Staically linked vim version compiled from https://github.com/ericpruitt/static-vim
# Compiled on Jul 20 2017
curl 'https://s3.amazonaws.com/bengoa/vim-static.tar.gz' | tar -xz
export VIMRUNTIME="$HOME/vim/runtime"
export PATH="$HOME/vim:$PATH"
cd -
@loganhenson
loganhenson / CHANGELOG.md
Last active June 29, 2020 17:25
Changelog Example

Change Log

All changes to the XD will be documented in this file.

[version number] - yyyy-mm-dd

General High Level Description Sentence

Added

  • Description text box to the stress rating Modal
import { listenAndServe } from 'https://deno.land/std/http/mod.ts'
import { readFileStr } from 'https://deno.land/std/fs/mod.ts'
import { match } from 'https://cdn.pika.dev/path-to-regexp@^6.1.0'
const render = async ({ page, state }) => {
return `
<!doctype html>
<html lang=en>
<head>
<meta charset=utf-8>
console.clear();
const weight = 163; // lbs
const height = 182; // cm
const age = 27;
// Basal metabolic rate (calories you would use just sleeping all day)
const bmr = Math.floor(66 + (13.7 * (0.453592 * weight)) + (5 * height) - (6.8 * age));
// Total daily energy expenditure (includes a multiplier for a sedentary remote dev XD)
console.clear();
const weight = 163; // lbs
const height = 182; // cm
const age = 27;
// Basal metabolic rate (calories you would use just sleeping all day)
const bmr = Math.floor(66 + (13.7 * (0.453592 * weight)) + (5 * height) - (6.8 * age));
// Total daily energy expenditure (includes a multiplier for a sedentary remote dev XD)
@loganhenson
loganhenson / .phpcs.xml
Last active August 4, 2021 16:03
.phpcs.xml in your home directory (`cd ~`)
<?xml version="1.0"?>
<ruleset name="Laravel Standards">
<!--
The name attribute of the ruleset tag is displayed
when running PHP_CodeSniffer with the -v command line
argument. The description tag below is not displayed anywhere
except in this file, so it can contain information for
developers who may change this file in the future.
-->
@loganhenson
loganhenson / php-tighten-linting.md
Last active November 30, 2018 20:36
phpcs and tlint SUPER basic setup instructions

SUPER simple intro to a new dev for the steps to take to get PHPCS+Tlint set up in PHPstorm, and also the steps we would recommend Sublime use

Setting up linters for Tighten:

install phpcs and tlint

composer global require "squizlabs/php_codesniffer=*"
composer global require tightenco/tlint

MySql distance features you should know about!

There are many categories of apps out there that in some way/shape/form need to be able to find the simple distance between point A and point B.

A few examples might be:

  • A running or biking distance tracker will probably need to find the distance between point A and point B. Then point B and point C. Then point C and point D. (This would be a "linestring", but it still comes down to the simple problem of distance on the earth).
  • A restaurant delivery service might need to be able to see if you are within their maximum delivery distance.
/*import * as React from "react";
import * as ReactDOM from 'react-dom';
import { Provider } from 'react-redux'
import { Store, createStore } from 'redux';
import App from './containers/App';
import reducer from './data/reducer';
import { Model, initialState } from './data/model';
const store: Store<Model> = createStore(reducer, initialState);
@loganhenson
loganhenson / readme.md
Last active November 10, 2016 18:05
Elm - the why guide

Elm - the why guide

Why should I waste spend my time learning yet another javascript framework/language/thing?

First I want to set the tone of this post. We are taking an objective look at the javascript landscape and taking a bet on a tool.

Stage

  • we want correct software
  • with the least amount of time invested
  • we have more than 1 person working on it