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
jeanlucaslima / Readme.md
Last active Aug 1, 2019
Remote Work Resources
View Readme.md

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 Remote.com
  4. Remote.co is not Remote.com, remote.co is ok.
  5. There are companies that hire and act as a guild, but only pay as freelancer (X-team, Gun.io, and so on)
  6. Not really focused on freelancing, as it is to me more like a one-person business
@matthargett
matthargett / ts-vs-flow.md
Created Nov 19, 2018
TypeScript versus flowtype
View ts-vs-flow.md

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
hagemann / slugify.js
Last active Aug 14, 2019
Slugify makes a string URI-friendly
View slugify.js
function slugify(string) {
const a = 'àáäâãåăæąçćčđďèéěėëêęğǵḧìíïîįłḿǹńňñòóöôœøṕŕřßşśšșťțùúüûǘůűūųẃẍÿýźžż·/_,:;'
const b = 'aaaaaaaaacccddeeeeeeegghiiiiilmnnnnooooooprrsssssttuuuuuuuuuwxyyzzz------'
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
Frondor / suckData.js
Last active Sep 27, 2018
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>
@matteocrippa
matteocrippa / mac-setup.sh
Last active Aug 8, 2019
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
@narainsagar
narainsagar / nodejs - get filesize in readable format.md
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 format.md

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
zcorpan / htmlquiz-iframe-escape.md
Last active Sep 20, 2016
#HTMLQuiz what happens (iframe escape)
View htmlquiz-iframe-escape.md

#HTMLQuiz what happens?

<iframe id=x></iframe>
<script>
x.contentDocument.body.appendChild(x);
</script>
  • wild DOMException appears
  • iframe escapes
@mor10
mor10 / functions.php
Created Jul 11, 2016
Alternative method for adding parent theme stylesheet to WordPress child theme
View functions.php
<?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
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: https://2016.wpcampus.org/schedule/wordpress-masterclass/
Description: A Twenty Sixteen child theme
Author: Morten Rand-Hendriksen
Author URI: https://lynda.com/mor10
Template: twentysixteen
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@noelboss
noelboss / git-deployment.md
Last active Aug 16, 2019
Simple automated GIT Deployment using Hooks
View git-deployment.md

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 github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

You can’t perform that action at this time.