Skip to content

Instantly share code, notes, and snippets.

View ryanwinchester's full-sized avatar
⚗️
Working on open-source and side projects

Ryan Winchester ryanwinchester

⚗️
Working on open-source and side projects
View GitHub Profile
@ryanwinchester
ryanwinchester / PMS.md
Last active February 23, 2017 18:58
Project Management Tools Ranking

Project Management(ish) SaaS tools

In order of how much I don't hate them (and only including ones I have tried).

  • Trello *
  • Github Projects (with issues and milestones) *
  • Sprintly *
  • Dapulse *
  • Clubhouse *
  • Waffle
@ryanwinchester
ryanwinchester / ConwaySort.c
Created February 27, 2017 21:37
O(1) Sorting algorithm, from http://pastebin.com/LP5sxLyx
#include <stdio.h>
#include <stdlib.h>
/**
* ConwaySort:
* sorts an array by ignoring it and then
* printing out a new, sorted array with its
* own "Alternative Values."
*
* If the new array does not appear sorted,
* you have been manipulated by MSM
@ryanwinchester
ryanwinchester / fix-laravel-debian.sh
Last active February 28, 2017 20:55
Solve all Laravel problems with one script
#!/bin/bash
if [[ -z "$1" ]] ; then
echo 'Need path to app dir'
exit 1
fi
app_path="$1"
# Laravel Console Commands to fix problems
@ryanwinchester
ryanwinchester / upgrade.md
Created March 2, 2017 06:53 — forked from chrismccord/upgrade.md
Phoenix 1.2.x to 1.3.0 Upgrade Instructions

If you want a run-down of the 1.3 changes and the design decisions behind those changes, check out the LonestarElixir Phoenix 1.3 keynote: https://www.youtube.com/watch?v=tMO28ar0lW8

To use the new phx.new project generator, you can install the archive with the following command:

$ mix archive.install https://github.com/phoenixframework/archives/raw/master/phx_new.ez

Bump your phoenix dep

Phoenix v1.3.0 is a backwards compatible release with v1.2.x. To upgrade your existing 1.2.x project, simply bump your phoenix dependency in mix.exs:

@ryanwinchester
ryanwinchester / carbonize.php
Last active October 14, 2017 21:14
Carbon helper. Returns a NEW instance of Carbon from input
<?php
use Carbon\Carbon;
if (! function_exists('carbonize')) {
/**
* @param mixed $time
* @param string $tz
* @return Carbon
* @throws InvalidArgumentException
#!/bin/bash
# Erlang
ERLANG_VERSION=${ERLANG_VERSION:-19.0}
ERLANG_CACHED_DOWNLOAD="${HOME}/cache/OTP-${ERLANG_VERSION}.tar.gz"
ERLANG_DIR=${ERLANG_DIR:="$HOME/erlang"}
# Elixir
ELIXIR_VERSION=${ELIXIR_VERSION:-1.3.4}
ELIXIR_CACHED_DOWNLOAD="${HOME}/cache/elixir-v${ELIXIR_VERSION}.zip"
@ryanwinchester
ryanwinchester / specs.md
Last active April 21, 2017 21:35
How to make a good multiplayer pool game

Multiplayer 8-ball

  • chat
    • mute/ignore
  • custom games
    • selectable rules
    • custom wagers
  • spectators
  • stats and prizes for leveling up
{
"env": {
"browser": true,
"node": true
},
"parserOptions": {
"sourceType": "module"
},
@ryanwinchester
ryanwinchester / rectangle.ex
Last active June 1, 2017 02:34
Resize with max width or height
defmodule Rectangle do
@doc """
Resize a rectangle using the same logic as similar
triangles to keep the aspect ratio with a max size.
## Algebra
`{300, 400} => {x, 100}`

Keybase proof

I hereby claim:

  • I am ryanwinchester on github.
  • I am ryanwinchester (https://keybase.io/ryanwinchester) on keybase.
  • I have a public key ASCDTtHOe-VLx_hFRhGVznpVgxf5AkbpRO1pGvUXXFQtsgo

To claim this, I am signing this object: