Skip to content

Instantly share code, notes, and snippets.

View manderly's full-sized avatar

Mandi Burley manderly

View GitHub Profile
@manderly
manderly / cbm-ingredients
Created November 6, 2014 19:03
ChickenBreastMeals: Editable ingredients list created with ng-repeat
<h2>Ingredients</h2>
<ol class="ingredients-list">
<!-- loop through and display existing ingredients -->
<li data-ng-repeat="ingredient in formMeal.ingredients track by $index">
<textarea name="ingredientLines"
type="text"
data-ng-model="formMeal.ingredients[$index].name"
placeholder="Add ingredient"
data-ng-change="changeIngredient($index)"
></textarea>
@manderly
manderly / gist:9db712804d635a0f23ec
Created November 7, 2014 03:12
CBM.com admin controller changeIngredient method
$scope.changeIngredient = function(index) {
if (index == $scope.formMeal.ingredients.length -1) {
$scope.formMeal.ingredients.push('');
}
};
@manderly
manderly / prepare-commit-msg
Created February 9, 2015 18:20
Git hook: Automatically add branch name to the end of every commit message
# Automatically adds branch name to the end of every commit message. Handy for git/JIRA integrations.
# Make a copy of .git/hooks/prepare-commit-msg.sample in your repo and name the file prepare-commit-msg (remove "sample" extension)
# Paste the following into the file, save the file, and try it out in bash
NAME=$(git branch | grep '*' | sed 's/* //')
echo $(cat "$1") "$NAME" > "$1"
@manderly
manderly / bashrc_customizations
Created February 13, 2015 18:56
.bashrc customization to show computer name, current directory path, and current git branch
#Add this to the bottom of your .bashrc file and run source ~/.bashrc
#thanks to
#http://www.ibm.com/developerworks/linux/library/l-tip-prompt/ and
#http://martinfitzpatrick.name/article/add-git-branch-name-to-terminal-prompt-mac/
# Git branch in prompt.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
@manderly
manderly / sqlcourse2exercises.txt
Last active January 28, 2016 23:19
My answers to sqlcourse2.com exercises
-- Select
SELECT * FROM items_ordered WHERE customerid = 10449;
SELECT * FROM items_ordered WHERE item = 'tent';
SELECT customerid, order_date, item FROM items_ordered WHERE item LIKE '%S';
SELECT DISTINCT item FROM items_ordered;
@manderly
manderly / course-explorer-mock-data.json
Created December 20, 2017 03:51
course-explorer-mock-data.json
{
"courses":{
"CS123":{
"fullName":"CS 123 - Introduction to Coding",
"description":"A solid course with a brilliant instructor",
"tips":[
{
"tip":"Study hard",
"timestamp":"July 2017"
},
.pros-cons-table {
width:100%;
}
.pros-cons-table tbody tr td {
border: 2px solid white;
}
.pros-cons-header {
width: 50%;
@manderly
manderly / items.json
Created July 31, 2018 02:11
Export of Items data as a JSON from Google Sheets for use in GameMaker Studio 2
[
{
"name": "Rusty Broadsword",
"prestige": 0,
"slot": "mainHand",
"rarity": "common",
"classRestriction": "warrior",
"noDrop": false,
"hpRaw": 0,
"manaRaw": 0,
@manderly
manderly / hero.gd
Created December 17, 2018 02:35
hero.gd copied from godot project for the sake of example 12/16/2018
extends "basehero.gd"
#hero.gd
#todo: globalize these
var mainRoomMinX = 110
var mainRoomMaxX = 360
var mainRoomMinY = 250
var mainRoomMaxY = 410
var outsideMinX = 150
@manderly
manderly / baseHero.gd
Created December 17, 2018 02:37
baseHero.gd
extends KinematicBody2D
#Hero properties - not governed by external spreadsheet data
#These are set when a hero is randomly generated in heroGenerator.gd
var heroID = -1
var heroName = "Default Name"
var heroClass = "NONE"
var level = -1
var xp = -1
var currentRoom = 0 #outside by default