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
jeanlucaslima /
Last active Oct 5, 2019
Remote Work Resources

Remote Jobs general guideline

This is something I compiled during the last weeks while job hunting. If you miss something in this list, please fork or tell me on twitter and I'll add what's missing.

  1. Be careful with jobs that are not clear they hire outside US
  2. Look for job in niches (like SaaS job boards, language-specific communities, country-focused, and so on)
  3. Avoid Upwork (pay to work, no guaranteed results, often bad contracts) and
  4. is not, is ok.
  5. There are companies that hire and act as a guild, but only pay as freelancer (X-team,, and so on)
  6. Not really focused on freelancing, as it is to me more like a one-person business
matthargett /
Created Nov 19, 2018
TypeScript versus flowtype

First, let's note the difference in philosophy: TypeScript aims for fast analysis because you can to compile it down to JS before you can run/test it. flowtype is meant to be an async analysis that can run continuously with changes since the last analysis, or in parallel with your eslint and bundler rules. As such, flowtype's type system and analysis is not quite as concerned with speed or memory usage in service of potentially finding more bugs.

On two occasions I have tried to roll out flow in React Native applications, and on those two occasions we ended up backing out after a few weeks. Some detail: flow doesn't have a public roadmap, and what version you use is dictated by the react/react-native dependency and the annotations in react-native itself. flowtype also has some hard-coded aspects to help the analysis for React, so major updates to React itself sometimes also require updating flowtype to match. React Native upgrades then get gated based on your dependent libraries (or flow-typed) being updated

hagemann / slugify.js
Last active Oct 14, 2019
Slugify makes a string URI-friendly
View slugify.js
function slugify(string) {
const a = 'àáâäæãåāăąçćčđďèéêëēėęěğǵḧîïíīįìłḿñńǹňôöòóœøōõṕŕřßśšşșťțûüùúūǘůűųẃẍÿýžźż·/_,:;'
const b = 'aaaaaaaaaacccddeeeeeeeegghiiiiiilmnnnnooooooooprrsssssttuuuuuuuuuwxyyzzz------'
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
Frondor / suckData.js
Last active Sep 27, 2018
HTML table data to JSON
View suckData.js
* ~ 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>
matteocrippa /
Last active Aug 8, 2019
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
narainsagar / nodejs - get filesize in readable
Created Oct 5, 2016
node.js - function to get file and convert the file size in humanly readable format.
View nodejs - get filesize in readable

node.js - get the filesize in readable format.

This will take filePath as a function parameter and reads the file via fs module and get the file and converts it's size into more humanly readable format.

function getFileSize(filePath) {
  var stats = fs.statSync(filePath);
  // console.log('stats', stats);
  var size = stats["size"];
  // convert it to humanly readable format.
zcorpan /
Last active Sep 20, 2016
#HTMLQuiz what happens (iframe escape)

#HTMLQuiz what happens?

<iframe id=x></iframe>
  • wild DOMException appears
  • iframe escapes
mor10 / functions.php
Created Jul 11, 2016
Alternative method for adding parent theme stylesheet to WordPress child theme
View functions.php
// Enqueue the parent theme stylesheet, then the child theme stylesheet.
// Used in place of @import rule in child theme style.css
function child_theme_name_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) );
add_action( 'wp_enqueue_scripts', 'child_theme_name_enqueue_styles' );
mor10 / style.css
Last active Jan 22, 2018
WordPress child theme setup based on the Twenty Sixteen parent theme
View style.css
Theme Name: Twenty Sixteen Child Theme
Theme URI:
Description: A Twenty Sixteen child theme
Author: Morten Rand-Hendriksen
Author URI:
Template: twentysixteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI:
noelboss /
Last active Oct 19, 2019
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like or and pull or export it to a production server. Or you use a service like to act upon a Web-Hook that's triggered that service.

You can’t perform that action at this time.