Skip to content

Instantly share code, notes, and snippets.

View jadenlemmon's full-sized avatar
🚀
Hacking away

Jaden Lemmon jadenlemmon

🚀
Hacking away
View GitHub Profile
@jadenlemmon
jadenlemmon / bootstrap-start
Created January 12, 2015 19:54
Bootstrap Start
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" href="../../favicon.ico">
@jadenlemmon
jadenlemmon / Dockerfile
Created February 16, 2021 15:46
Shipfinder Dockerfile
FROM node:12-alpine3.9
ENV DOCKERIZE_VERSION v0.6.1
RUN wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& tar -C /usr/local/bin -xzvf dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz \
&& rm dockerize-alpine-linux-amd64-$DOCKERIZE_VERSION.tar.gz
WORKDIR /app
@jadenlemmon
jadenlemmon / config.yml
Last active August 13, 2021 17:54
Shipfinder Voyage Config
services:
app:
context: ./
primary: true
exposePort: 3000
environment:
- name: APP_ENV
value: 'voyage'
- name: NODE_ENV
value: 'production'
@jadenlemmon
jadenlemmon / run_app.sh
Created February 19, 2021 18:11
Sample seed and run script
#!/bin/bash
cd /app
knex migrate:latest
knex seed:run
node server.js
@jadenlemmon
jadenlemmon / ProjectFactory.php
Created February 19, 2021 18:43
ProjectFactory
class ProjectFactory extends Factory
{
/**
* The name of the factory's corresponding model.
*
* @var string
*/
protected $model = Project::class;
/**
@jadenlemmon
jadenlemmon / ProjectSeeder.php
Created February 19, 2021 18:44
ProjectSeeder
use App\Models\Project;
public function run()
{
Project::factory()
->count(5)
->create();
}
@jadenlemmon
jadenlemmon / index.js
Created November 1, 2021 17:55
Example A/B Test Gatsby v4 SSR Cookies
import { sample } from 'lodash';
import React from 'react';
import cookie from 'cookie';
import Layout from '../components/layout';
import HomeV1 from '../components/scenes/home/v1';
import HomeV2 from '../components/scenes/home/v2';
const EXPERIMENT_OPTIONS = {
v1: HomeV1,
v2: HomeV2,
@jadenlemmon
jadenlemmon / .gitconfig
Last active November 4, 2021 14:30
Git alias config file
[alias]
branch-name = "!git rev-parse --abbrev-ref HEAD"
c = checkout
cb = checkout -b
s = status
# push the current branch
pub = "!git push -u origin $(git branch-name)"
# open a pr in github
open = "!f() { open \"$(git ls-remote --get-url $(git config --get branch.$(git branch --show-current).remote) | sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' | sed 's|\\.git$||')/compare/$(git config --get branch.$(git branch --show-current).merge | cut -d / -f 3-)?expand=1\"; }; f"
last = log -1 HEAD --stat
@jadenlemmon
jadenlemmon / tailwind.config.js
Created March 23, 2022 19:30
Example Tailwind Config File
module.exports = {
content: ["./lib/templates/**/*.{html,j2}"],
theme: {
extend: {},
},
plugins: [require("@tailwindcss/forms")],
};
@jadenlemmon
jadenlemmon / docker-compose.yml
Created March 23, 2022 19:36
Island List Example Docker Compose File
version: "3"
services:
app:
build:
context: ./
environment:
APP_ENV: local
DB_HOST: database
networks:
- islandfinder