Skip to content

Instantly share code, notes, and snippets.

View subfuzion's full-sized avatar

Tony Pujals subfuzion

View GitHub Profile
@subfuzion
subfuzion / redis-autostart-osx.md
Last active April 26, 2024 21:40
redis auto start OS X

Install with Homebrew

brew install redis

Set up launchctl to auto start redis

$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents

/usr/local/opt/redis/ is a symlink to /usr/local/Cellar/redis/x.y.z (e.g., 2.8.7)

@subfuzion
subfuzion / mysql-autostart-osx.md
Created March 18, 2014 22:39
mysql auto start on OS X

Install with Homebrew

brew install mysql

Set up launchctl to auto start mysql

$ ln -sfv /usr/local/opt/mysql/*.plist ~/Library/LaunchAgents

/usr/local/opt/mysql/ is a symlink to /usr/local/Cellar/mysql/x.y.z (e.g., 5.6.16)

@subfuzion
subfuzion / webstorm.md
Last active April 22, 2022 17:53
Webstorm run configuration for npm and grunt
npm run configuration
  • JavaScript file: /usr/local/lib/node_modules/npm/bin/npm-cli.js
  • Application parameters: run start
grunt run/debug configuration
  • JavaScript file: /usr/local/lib/node_modules/grunt-cli/bin/grunt
Issue Tracker
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@subfuzion
subfuzion / update.sh
Last active August 29, 2015 14:10
Update Repos Script
#!/usr/bin/env bash
# tony@subfuzion.com
# WARNING! This script assumes you never work in the master branch,
# so it doesn't check to see if there are any uncommitted changes
# or untracked files. If the branch is master, this script will
# attempt a git pull; otherwise, it will perform a git fetch.
# directories to include (use valid glob patterns, default is all)
declare -a whitelist=( */ )
@subfuzion
subfuzion / http-status-codes.md
Last active September 3, 2023 09:15
General REST API HTTP Status Codes

Reference: RFC 2616 - HTTP Status Code Definitions

General

  • 400 BAD REQUEST: The request was invalid or cannot be otherwise served. An accompanying error message will explain further. For security reasons, requests without authentication are considered invalid and will yield this response.
  • 401 UNAUTHORIZED: The authentication credentials are missing, or if supplied are not valid or not sufficient to access the resource.
  • 403 FORBIDDEN: The request has been refused. See the accompanying message for the specific reason (most likely for exceeding rate limit).
  • 404 NOT FOUND: The URI requested is invalid or the resource requested does not exists.
  • 406 NOT ACCEPTABLE: The request specified an invalid format.
@subfuzion
subfuzion / node-training.md
Last active August 29, 2015 14:10
Node Training Curriculum

Orientation (1 hr)

  • Overview of Node.js platform

    • Platform benefits
    • Programming model
    • Package system and registries
  • Getting started

    • Tool chain installation
  • Documentation guide

@subfuzion
subfuzion / disable-npm-spinner.md
Created December 8, 2014 17:43
Disable npm spinner
@subfuzion
subfuzion / global-gitignore.md
Last active May 5, 2024 19:34
Global gitignore

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file:

  • Create a file called .gitignore in your home directory and add any filepath patterns you want to ignore.
  • Tell git where your global gitignore file is.

Note: The specific name and path you choose aren't important as long as you configure git to find it, as shown below. You could substitute .config/git/ignore for .gitignore in your home directory, if you prefer.

@subfuzion
subfuzion / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;