Skip to content

Instantly share code, notes, and snippets.

Josh Buchea joshbuchea

Block or report user

Report or block joshbuchea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View cloudSettings
{"lastUpload":"2019-11-09T18:56:30.057Z","extensionVersion":"v3.4.3"}
@joshbuchea
joshbuchea / mac-setup.sh
Created Aug 8, 2019 — forked from matteocrippa/mac-setup.sh
a script to quick setup my dev Mac
View mac-setup.sh
#!/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 Aug 22, 2018 — forked from hagemann/slugify.js
Slugify makes a string URI-friendly
View slugify.js
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 Jun 27, 2018
React Example: Bare Minimum
View react-example-bare-minimum.html
<!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 Jan 22, 2018 — forked from Frondor/suckData.js
HTML table data to JSON
View suckData.js
/*
* 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 Jul 21, 2017 — forked from stan229/index.js
React Navigation and Redux example
View index.js
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 Jun 21, 2017 — forked from cvan/HOWTO.md
How to serve a custom HTTPS domain on GitHub Pages with CloudFlare: *FREE*, secure and performant by default
View HOWTO.md

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 Mar 29, 2018
Sensible CSS Styles
View starter-styles.css
/******************************************************************************
* 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,
View semantic-commit-messages.md

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 23, 2017
Git Ignore Examples
View .gitignore
# 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
You can’t perform that action at this time.