Skip to content

Instantly share code, notes, and snippets.

View mgan59's full-sized avatar
💭
Building The Future, what about you?

Morgan Craft mgan59

💭
Building The Future, what about you?
View GitHub Profile
@mgan59
mgan59 / US Zip Codes from 2013 Government Data
Created July 11, 2020 09:53 — forked from erichurst/US Zip Codes from 2013 Government Data
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993

Checking how it works

I have an exquation X1..n

@mgan59
mgan59 / gist:3420c3276db7270c6d321a5c4a1525ab
Created November 12, 2019 15:15
gitBabel window commands
echo -n -e "\033]0;DB-SNAPSHOT\007"
echo -n -e "\033]0;Edgar OPS\007"
@mgan59
mgan59 / diff.mdown
Created March 5, 2019 11:49 — forked from ndarville/diff.mdown
Paul Heckel's Diff Algorithm

[Isolating Differences Between Files][paper]

Advantage over Other Algorithms

The diff output is more specific:

[I]f a whole block of text is moved, then all of it, rather than just the beginning and end, is detected as changed.

>The algorithm described here avoids these difficulties. It detects differences that correspond very closely to our intuitive notion of difference.

@mgan59
mgan59 / LoginHeader.jsx
Created January 17, 2018 15:09
index.js
// styled-components
import styled from 'styled-components';
const LoginHeader = styled.h1`
font-size: 1.4rem;
padding:2rem 0;
margin: 0 auto;
`;
export default LoginHeader;
.
├── components
│   ├── atoms
│   │   └── KnowledgebasePageListItem
│   │       ├── KnowledgebasePageListItem.jsx
│   │       ├── __tests__
│   │       │   └── KnowledgebasePageListItem.tests.js
│   │       ├── index.js
│   │       └── knowledgebasePageListItem.scss

Templating engines and React.js

I want to make a shopify theme using react.

How shopify theming works

You have a bunch of template files that have access to global server-side variables with liquid e.g. {{ product.title }}. Think wordpress or any other theme-based system.

 /theme
@mgan59
mgan59 / keystonejs-json-post.js
Created November 16, 2014 16:24
KeystoneJS Server-Side Data Dump for Post
Keystone.list = {
"key":"Post",
"path":"posts",
"label":"Posts",
"singular":"Post",
"plural":"Posts",
"elements":[
{
"type":"field",
"field":{
@mgan59
mgan59 / node_philly_2013_notes.md
Last active December 29, 2015 00:09
my notes from the node philly hackon-ops 2013

Leadonomics on Monitoring

  • Presenter: Tom Shawver, @tomfrost
  • Company: Leadnomics

They are an ad server platform that was built on php/mysql. did not scale.

Greatist Hits (aka great fail)

@mgan59
mgan59 / ghost-editor-planning.md
Created October 29, 2013 14:59
Ghost Issue/Milestones for CodeMirror Editor

Ghost Editor Issue/Milestone/Planning

Experiment with Ace Editor Issue tracking

TryGhost/Ghost#1298

Ghost Split Screen (Code Mirror) Epic

TryGhost/Ghost#1294

Issues filed for Code Mirror on Ghost