Skip to content

Instantly share code, notes, and snippets.

View joshbuchea's full-sized avatar

Josh Buchea joshbuchea

View GitHub Profile
@joshbuchea
joshbuchea / cloudSettings
Last active April 1, 2020 03:33
cloudSettings
{"lastUpload":"2020-04-01T03:33:25.122Z","extensionVersion":"v3.4.3"}
@joshbuchea
joshbuchea / mac-setup.sh
Created August 8, 2019 23:53 — forked from matteocrippa/mac-setup.sh
a script to quick setup my dev Mac
#!/usr/bin/env bash
echo "Install XCode first"
xcode-select --install
# Setup directories
mkdir ~/Projects
mkdir ~/Projects/Repositories
mkdir ~/Projects/Material
@joshbuchea
joshbuchea / slugify.js
Created August 22, 2018 23:04 — forked from hagemann/slugify.js
Slugify makes a string URI-friendly
function slugify(string) {
const a = 'àáäâãåèéëêìíïîòóöôùúüûñçßÿœæŕśńṕẃǵǹḿǘẍźḧ·/_,:;'
const b = 'aaaaaaeeeeiiiioooouuuuncsyoarsnpwgnmuxzh------'
const p = new RegExp(a.split('').join('|'), 'g')
return string.toString().toLowerCase()
.replace(/\s+/g, '-') // Replace spaces with -
.replace(p, c => b.charAt(a.indexOf(c))) // Replace special characters
.replace(/&/g, '-and-') // Replace & with 'and'
.replace(/[^\w\-]+/g, '') // Remove all non-word characters
@joshbuchea
joshbuchea / react-example-bare-minimum.html
Last active June 27, 2018 21:57
React Example: Bare Minimum
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>React Example: Bare Minimum</title>
<link rel="icon" href="https://reactjs.org/favicon.ico" />
</head>
<body>
@joshbuchea
joshbuchea / suckData.js
Created January 22, 2018 01:18
HTML table data to JSON
/*
* THIS IS NOT A PLUGIN
* ~ but a personal snippet
*
* Sometimes when prototyping my designs, I like to get dummy data pretty fast.
* I use this snippet to extract that data from working (aka "real life") tables from other HTML tables I find on the net.
* So I'll need that same data but inside an object.
*
* This script assumes by default the table has the following structure:
* <table>
@joshbuchea
joshbuchea / index.js
Created July 21, 2017 04:16 — forked from stan229/index.js
React Navigation and Redux example
import React, { Component } from "react";
import { Text } from "react-native";
import { Provider, connect } from "react-redux";
import { StackNavigator, addNavigationHelpers } from "react-navigation";
import Routes from "./config/routes";
import getStore from "./store";
const AppNavigator = StackNavigator(Routes);
@joshbuchea
joshbuchea / HOWTO.md
Created June 21, 2017 00:45 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default

Instructions

CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control and E-Tag headers, etc.), minification, etc.

  1. Make sure you have registered a domain name.
  2. Sign up for CloudFlare and create an account for your domain.
  3. In your domain registrar's admin panel, point the nameservers to CloudFlare's (refer to this awesome list of links for instructions for various registrars).
  4. From the CloudFlare settings for that domain, enable HTTPS/SSL and set up a Page Rule to force HTTPS redirects. (If you want to get fancy, you can also enable automatic minification for text-based assets [HTML/CSS/JS/SVG/etc.], which is a pretty cool feature if you don't want already have a build step for minification.)
  5. If you
@joshbuchea
joshbuchea / starter-styles.css
Last active March 29, 2018 23:47
Sensible CSS Styles
/******************************************************************************
* Page Defaults
*****************************************************************************/
/* Bootstrap 4 Reboot: https://getbootstrap.com/docs/4.0/content/reboot/ */
/* Bootstrap 4 Reboot CSS: https://github.com/twbs/bootstrap/blob/v4-dev/dist/css/bootstrap-reboot.css */
/* global box-sizing */
*,
*::before,
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active April 16, 2024 12:32
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@joshbuchea
joshbuchea / .gitignore
Last active May 26, 2023 23:12
Git Ignore Examples
# node.js #
############
node_modules/
npm-debug.*
yarn.lock
# Packages #
############
# it's better to unpack these files and commit the raw source
# git has its own built in compression methods