Skip to content

Instantly share code, notes, and snippets.

View jakesorce's full-sized avatar

Jake Sorce jakesorce

View GitHub Profile
@jakesorce
jakesorce / README.md
Last active November 14, 2017 04:53 — forked from mrkpatchaa/README.md
Bulk delete github repos

Use this trick to bulk delete your old repos or old forks

(Inspired by https://medium.com/@icanhazedit/clean-up-unused-github-rpositories-c2549294ee45#.3hwv4nxv5)

  1. Open in a new tab all to-be-deleted github repositores (Use the mouse’s middle click or Ctrl + Click) https://github.com/username?tab=repositories

  2. Use one tab https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall to shorten them to a list.

  3. Save that list to some path

  4. The list should be in the form of “ur_username\repo_name” per line. Use regex search (Sublime text could help). Search for '|\s+.*' and replace by empty.

@jakesorce
jakesorce / phabricator_readme.md
Last active November 7, 2017 17:24 — forked from sparrc/phabricator_readme.md
Phabricator Ubuntu Installation Guide

Phabricator Ubuntu Installation Guide

This is a supplement to the official Phabricator Installation Guide, because their guide will leave you with all kinds of permission and config errors and ~15,000 setup issues on startup.

Install bonus packages:

# apt-get install mercurial subversion python-pygments sendmail imagemagick

Create necessary users and add phd-user to sudoers:

.alert {
padding: 15px;
margin-bottom: 20px !important;
border: 1px solid transparent;
border-radius: 4px;
}
.alert-success {
color: #3c763d;
background-color: #dff0d8;
import { combineReducers } from 'redux'
import user from './user'
import flash from './flash'
const rootReducer = combineReducers({
user,
flash,
})
export default rootReducer
import React from 'react';
import { connect } from 'react-redux';
import { clearFlash } from '../actions/flash.js';
import '../styles/flash.css';
const fadeFlash = (dispatch) => {
setTimeout( () => {
dispatch(clearFlash())
}, 15000)
}
import React, { Component } from 'react';
import PlayerForm from './PlayerForm';
import Game from './Game';
class App extends Component {
state = { username: '', gameOver: false, gameStarted: false };
setUsername = (e) => {
this.setState({ username: e.target.value });
import React, { Component } from 'react';
import { StyleSheet } from 'react-native';
import {
Container,
Header,
Title,
Content,
Button,
Left,
Right,
import React from 'react';
import Player from './Player';
import Game from './Game';
class Yahtzee extends React.Component {
state = { name: '', edit: true }
updatePlayer = (name) => {
this.setState({ name, edit: false })
}
import React from 'react';
import { Link } from 'react-router-dom';
const About = () => (
<div className="container">
<h2 className="center">About Yahtzee</h2>
<p>Yahtzee is a dice game made by Milton Bradley (now owned by Hasbro), which was first marketed as "Yatzie" by the National Association Service of Toledo, Ohio, in the early 1940s. Yatzie was included in a game set called "LUCK - 15 Grand Dice Games". It was marketed under the name of Yahtzee by game entrepreneur Edwin S. Lowe in 1956. Lowe is also responsible for introducing Bingo to the U.S. market.[1] The game is a development of earlier dice games such as Poker Dice, Yacht and Generala. It is also similar to Yatzy, which is popular in Scandinavia.
</p>
<p>The object of the game is to score points by rolling five dice to make certain combinations. The dice can be rolled up to three times in a turn to try to make various scoring combinations. A game consists of thirteen rounds. After each round the player chooses which scoring category
let count = 1;
export const singles = (value, dice) => {
return dice.filter( d => d === value ).reduce( (total, val) => {
return total + value;
}, 0);
}
export const addAllDice = (type, dice) => {
let totals = [];