Skip to content

Instantly share code, notes, and snippets.

View therebelrobot's full-sized avatar
A girl made of PLA and caffeine

Aster Haven therebelrobot

A girl made of PLA and caffeine
View GitHub Profile
@therebelrobot
therebelrobot / doc.md
Created July 22, 2016 22:33 — forked from nijikokun/doc.md
Building Javascript Frontend / Backend Applications

Document for the best design choices you can make for your software.

Terminology

  • DDD - [Domain Driven Design][ddd-wikipedia]
  • FF or FTF - Function First Design, or File-type First Design is structuring your application by it's function before the files such as a directory named components containing all component files.

File Structure

Structuring applications is hard, here are a few resources to help.

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@therebelrobot
therebelrobot / about.md
Created June 2, 2016 20:22 — forked from nijikokun/about.md
A small, basic, generic game framework / game with no potential being made for fun using weird javascript techniques. Also, I made my own commenting style based on KSS.

GOD.js

Game oriented development framework.

Usage

var entity = god.entity({
  name: "Nijikokun"
}).implement("health").implement("movement");
eventsSchema.statics.fetchMeetupEvents = function (meetupid) {
return new Promise(function (resolve, reject) {
request(meetupid, function (error, response, body) {
if (!error && response.statusCode === 200) {
var parsed = JSON.parse(body)
resolve(parsed.results)
}else{
reject(error)
}
})

Install Java, Cassandra & Kong on Ubuntu 14.04

$ sudo su
# curl -L http://git.io/vUvmI | sh
# sudo kong start && exit
wget -O kong.sh http://git.io/vJABW
# Remove previous installations
sudo apt-get remove vim vim-runtime vim-tiny vim-common
# Install dependencies
sudo apt-get install libncurses5-dev python-dev libperl-dev ruby-dev liblua5.2-dev
# Fix liblua paths
sudo ln -s /usr/include/lua5.2 /usr/include/lua
sudo ln -s /usr/lib/x86_64-linux-gnu/liblua5.2.so /usr/local/lib/liblua.so
# Type(<scope>): <subject>
# <body>
# <footer>
# Type should be one of the following:
# * feat (new feature)
# * fix (bug fix)
# * docs (changes to documentation)
# * style (formatting, missing semi colons, etc; no code change)
# * refactor (refactoring production code)

JankyBrowser

The only cross-platform browser that fits in a Gist!

One line install. Works on Linux, MacOSX and Windows.

Local Install

$&gt; npm install http://gist.github.com/morganrallen/f07f59802884bcdcad4a/download
@therebelrobot
therebelrobot / .gitconfig
Last active August 29, 2015 14:09 — forked from pksunkara/config
[user]
name = Trent Oswald
email = trentoswald@therebelrobot.com
[core]
editor = subl -w
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[web]
browser = google-chrome
[push]

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "you@example.com"
npm set init.author.url "http://yourblog.com"

npm adduser