Skip to content

Instantly share code, notes, and snippets.

View notjamesheck's full-sized avatar
💀

James Heck notjamesheck

💀
View GitHub Profile
@notjamesheck
notjamesheck / AutoExpand.elm
Created May 27, 2018 02:21 — forked from ohanhi/AutoExpand.elm
A pure Elm auto expanding text area
module AutoExpand exposing (main)
-- https://embed.ellie-app.com/Gnv9Bznh4na1/0
import Html exposing (Html, div, p, br, textarea, text)
import Html.Attributes exposing (rows, style)
import Html.Events exposing (onInput, on)
import Json.Decode exposing (Decoder, field, at, map2, int, string)
type alias Model =
@notjamesheck
notjamesheck / default nginx configuration file
Created April 7, 2018 13:29 — forked from skbr1234/default nginx configuration file
The default nginx configuration file inside /etc/nginx/sites-available/default
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# http://wiki.nginx.org/Pitfalls
# http://wiki.nginx.org/QuickStart
# http://wiki.nginx.org/Configuration
#
# Generally, you will want to move this file somewhere, and start with a clean
# file but keep this around for reference. Or just disable in sites-enabled.
#
@notjamesheck
notjamesheck / package.json
Created March 18, 2018 20:43 — forked from coryhouse/package.json
package.json for Building a JS Development Environment on Pluralsight
{
"name": "javascript-development-environment",
"version": "1.0.0",
"description": "JavaScript development environment Pluralsight course by Cory House",
"scripts": {
},
"author": "Cory House",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "1.0.0"
@notjamesheck
notjamesheck / Simple reversible datetime representation
Created February 14, 2018 17:42 — forked from eculver/Simple reversible datetime representation
Basic conversion of python datetime to string and back
import datetime
fmt = '%Y%m%d%H%M%S' # ex. 20110104172008 -> Jan. 04, 2011 5:20:08pm
now_str = datetime.datetime.now().strftime(fmt)
now_datetime = datetime.datetime.strptime(now_str, fmt)
@notjamesheck
notjamesheck / Simple reversible datetime representation
Created February 14, 2018 17:42 — forked from eculver/Simple reversible datetime representation
Basic conversion of python datetime to string and back
import datetime
fmt = '%Y%m%d%H%M%S' # ex. 20110104172008 -> Jan. 04, 2011 5:20:08pm
now_str = datetime.datetime.now().strftime(fmt)
now_datetime = datetime.datetime.strptime(now_str, fmt)
@notjamesheck
notjamesheck / validate_uuid4.py
Created February 12, 2018 19:34 — forked from ShawnMilo/validate_uuid4.py
Validating a uuid4 with Python.
from uuid import UUID
def validate_uuid4(uuid_string):
"""
Validate that a UUID string is in
fact a valid uuid4.
Happily, the uuid module does the actual
checking for us.