This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Adhere strictly to Single Responsibility Principle for functions as well as classes - each function should do exactly one thing and do it well. Use function names that clearly describe their purpose, making comments often unnecessary. Strongly prefer a pipeline of small, focused functions over monolithic functions with multiple responsibilities. Aim for functions that are short enough to view without scrolling (typically under 20 lines). | |
Pull magic strings and magic numbers out into constants--don't embed them directly in the middle of functions. | |
Do not add comments that are self-explanatory (e.g., // Constants)--make function names self-explanatory. | |
Do not add comments as headers describing blocks of code. That's often an indicator that block of code should be a function named that thing you were describing. (e.g., "// print heading" should become printHeading()) | |
TypeScript functions always need argument types and return types. If you don't know the type, go find out by looking at the function you get |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# OSX | |
# | |
.DS_Store | |
# React Native | |
# | |
/node_modules | |
/ios/kif_screenshots/ | |
*.jsbundle* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Shader "Hidden/RedOffsetShader" { | |
Properties { | |
_MainTex ("Base (RGB)", 2D) = "white" {} | |
} | |
SubShader { | |
Pass { | |
CGPROGRAM | |
#pragma vertex vert_img | |
#pragma fragment frag |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
invalidate-cloudfront-common: &invalidate-cloudfront-common | |
image: cgswong/aws:aws | |
commands: | |
- aws configure set preview.cloudfront true | |
- aws cloudfront create-invalidation --distribution-id $DISTRIBUTION_ID --paths "/*" | |
secrets: [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY] | |
pipeline: | |
invalidate-cloudfront-dev: | |
<<: *invalidate-cloudfront-common |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { sample } from 'lodash' | |
export default class TitleGenerator { | |
static generate() { | |
return sample(this.phrases()) | |
} | |
static phrases() { | |
return [ | |
`${sample(this.gibberish())} the ${sample(this.adjectives())} aspect ${sample(this.rises())}. ${sample(this.gibberish())} ${sample(this.interrogations())}`, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Organizational Tools: | |
* Trello for prioritizing the most important thing to be working on next | |
(typically divided into backlog, doing, review and done columns) | |
* Github pull requests before merging code to master | |
(not just programmers: artists and other interested parties have a say too) | |
Regular Meetings: | |
* Morning team standups |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MikeBlindBot < RTanque::Bot::Brain | |
NAME = 'MikeBlindBot2' | |
include RTanque::Bot::BrainHelper | |
TURRET_FIRE_RANGE = RTanque::Heading::ONE_DEGREE * 1.0 | |
def tick! | |
## main logic goes here | |
@direction_degrees ||= 0 | |
if self.sensors.position.on_top_wall? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MikeBlindBot < RTanque::Bot::Brain | |
NAME = 'MikeBlindBot' | |
include RTanque::Bot::BrainHelper | |
def tick! | |
## main logic goes here | |
@direction_degrees ||= 0 | |
if self.sensors.position.on_top_wall? | |
@direction_degrees = -180 | |
elsif self.sensors.position.on_bottom_wall? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
using System; | |
using System.Collections; | |
public class CheatActivator : MonoBehaviour { | |
private DateTime ClickedAt; | |
private const int MIN_SECONDS = 5; | |
private const string CHEAT_SCENE = "Cheats"; | |
public void OnPress(bool isDown) { |
NewerOlder