Skip to content

Instantly share code, notes, and snippets.

@patmigliaccio
patmigliaccio / prettier-git-config.sh
Last active September 22, 2020 20:41
updates entire git repo history with prettier based on .prettierrc
#!/bin/sh
# Reference: https://medium.com/millennial-falcon-technology/reformatting-your-code-base-using-prettier-or-eslint-without-destroying-git-history-35052f3d853e
git filter-branch --tree-filter 'prettier --config ../../.prettierrc --write "src/{app,environments,assets}/**/*{.ts,.js,.json,.css,.scss}" || echo "formatting error"' -- --all
@sibelius
sibelius / flow-redux.guideline.md
Created November 10, 2017 16:23
How to easily type Redux Props with Flow

How to easily type Redux Props with Flow

Add ExtractReturn helper

// https://hackernoon.com/redux-flow-type-getting-the-maximum-benefit-from-the-fewest-key-strokes-5c006c54ec87
// https://github.com/facebook/flow/issues/4002
// eslint-disable-next-line no-unused-vars
type _ExtractReturn<B, F: (...args: any[]) => B> = B;
export type ExtractReturn = _ExtractReturn&lt;*, F&gt;;
@TylerK
TylerK / index.js
Last active February 23, 2017 08:18
React Router 4, React -> Preact for production, Async route-based code-splitting.
import React from 'react'
import { render } from 'react-dom';
import { Router, Route } from 'react-router-dom';
import LazyRoute from 'lazy-route';
const App = () => {
render() {
return (
<Router>
<Route
@newswim
newswim / example.js
Created September 27, 2016 16:52
Fetching data with React's constructor
// I did not write this.
var url = "https://jsonplaceholder.typicode.com/albums"
// Auto unwrap the response as we want the data not the full headers for this simple example
const stringifyResponse = response => {
if (response.status >= 400) throw new Error(response)
return response.headers.get("Content-Type").includes("application/json") ? response.json() : response.text()
}
@CliffordAnderson
CliffordAnderson / docker
Last active January 16, 2019 17:23
Docker Image for Neo4j with APOC and Spatial plugins
# Adding APOC and the Spatial Library to Official Neo4j Docker Image
FROM neo4j:latest
MAINTAINER Clifford Anderson <anderson.clifford@gmail.com>
ENV APOC_URI https://github.com/neo4j-contrib/neo4j-apoc-procedures/releases/download/3.0.4.1/apoc-3.0.4.1-all.jar
ENV GIS_URI https://github.com/neo4j-contrib/m2/blob/master/releases/org/neo4j/neo4j-spatial/0.19-neo4j-3.0.3/neo4j-spatial-0.19-neo4j-3.0.3-server-plugin.jar?raw=true
RUN mv plugins /plugins \
&& ln --symbolic /plugins
@leonardofed
leonardofed / README.md
Last active April 17, 2024 13:42
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@DaniSancas
DaniSancas / neo4j_cypher_cheatsheet.md
Created June 14, 2016 23:52
Neo4j's Cypher queries cheatsheet

Neo4j Tutorial

Fundamentals

Store any kind of data using the following graph concepts:

  • Node: Graph data records
  • Relationship: Connect nodes (has direction and a type)
  • Property: Stores data in key-value pair in nodes and relationships
  • Label: Groups nodes and relationships (optional)
@bmcbride
bmcbride / google-form-to-github-issue.md
Last active April 5, 2024 15:47
Create a new GitHub Issue from a Google Form submission

Wiring up a Google Form to GitHub is not that difficult with a little bit of Apps Script automation. All you need is a Google account, a GitHub account, and a web browser...

Set up your GitHub Personal Access Token

Personal access tokens provide an easy way to interact with the GitHub API without having to mess with OAuth. If you don't already have a personal access token with repo or public_repo access, visit your GitHub settings page and generate a new token.

Be sure to copy your token some place safe and keep it secure. Once generated, you will not be able to view or copy the token again.

Set up the Form & Spreadsheet

  1. Create a Google Form.
@aethant
aethant / macsetup.sh
Created December 9, 2015 11:43 — forked from akira28/macsetup.sh
Mac Setup
#!/bin/bash
echo "Install brew"
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install caskroom/cask/brew-cask
echo ""
echo "Install apps"
brew cask install --appdir="/Applications" java google-chrome skype vagrant phpstorm firefox radiant-player mysqlworkbench sequel-pro textwrangler
brew cask install --appdir="/Applications" libreoffice slack dropbox imageoptim tunnelblick virtualbox virtualbox-extension-pack the-unarchiver
brew cask install --appdir="/Applications" ccleaner android-studio purevpn cyberduck ccleaner calibre coconutbattery flash-player
brew cask install --appdir="/Applications" spectacle vlc kodi xquartz inkscape launchrocket ngrok transmission gog-galaxy origin steam
@TylerK
TylerK / writing-better-tickets.md
Last active November 3, 2016 19:26
Writing Better Tickets

Overview

Issue reporting is not solely the domain of most QA departments. As such, many different people can be tasked with reporting issues we come across on our projects. It will make the lives of those on the development side much easier if all issues are written in a consistent manner and contain a minimum amount of necessary information.

Note: This document is not intended to instruct users how to report bugs and improvements. It is intended for fellow developers, QA folks, PM's, and any other employees involved in the software design & development processes.


When to File a Bug Vs. an Improvement