Skip to content

Instantly share code, notes, and snippets.

View devdbrandy's full-sized avatar
🎯
Meditating

Harry Dbrandy devdbrandy

🎯
Meditating
View GitHub Profile
@MollyJeanB
MollyJeanB / Chorely-User-Stories.md
Created March 22, 2018 16:35
React capstone user stories

User Stories

  • As a user, I should be able to view a demo account
  • As a user, I should be able to create an account
  • As a user, I should be able to login to my existing account if I enter the proper credentials
  • As a user, I should be able to create household members, give them names, and select their corresponding colors.
  • As a user, I should be able to create chores, give them names, assign point values, and specify the number of times they should be completed each week.
  • As a user, I should be able to update and delete chores.
  • As a user, I should be able to edit household members' names and colors. I should also be able to delete household members.
  • As a user, I should be able to check off who as completed a chore and see that member's score incremented.
@bulkan
bulkan / user.js
Created January 7, 2015 22:39
Mocking Sequelize model function
var Promise = require('bluebird');
var sinon = require('sinon');
var User = require('./db/models').User;
describe('User model', function(){
var userFindStub;
var sandbox;
before(function(){
sandbox = sinon.sandbox.create();
var Sequelize = require('sequelize');
var DataTypes = Sequelize;
sequelize = new Sequelize('mysql://root@localhost/29165644', {});
var Module = sequelize.define('module', {
id: DataTypes.INTEGER,
name: DataTypes.STRING,
description: DataTypes.STRING,
category_id: DataTypes.STRING,
@jonah-williams
jonah-williams / circle.yml
Last active May 29, 2019 14:53
Automating deployments to Heroku from CircleCI
test:
override:
- bundle exec rspec spec
deployment:
acceptance:
branch: master
commands:
- ./script/heroku_deploy.sh <ACCEPTANCE_HEROKU_APP>:
timeout: 300
@tlang0
tlang0 / coins.py
Last active July 21, 2019 22:12
Write a function that counts how many different ways you can make change for an amount of money, given an array of coin denominations. For example, there are 3 ways to give change for 4 if you have coins with denomination 1 and 2: 1+1+1+1, 1+1+2, 2+2.
combinations = []
amount = 12
def count_denoms(denoms, comb):
global combinations
for i in range(len(denoms)):
comb_new = comb + [denoms[i]]
if sum(comb_new) < amount:
count_denoms(denoms[i:], comb_new)
elif sum(comb_new) == amount:
@akhilome
akhilome / get-github-ssh.md
Last active September 5, 2019 12:21
Generate and add github ssh to linux machine

First run ...

ssh-keygen -t rsa -b 4096 -C 'email@domain.com'

... from terminal, then run ...

eval "$(ssh-agent -s)"
@psd
psd / index.html
Created June 13, 2012 10:09
iframe thumbnail
<!doctype html>
<html>
<head>
<title>page thumbnails using iframes and CSS3</title>
<meta charset="utf-8">
<style>
.thumbnail {
width: 300px;
height: 160px;
}
@iwek
iwek / html5-video-test
Created July 9, 2012 18:12
HTML5 Video Test
<video controls>
<source src=http://techslides.com/demos/sample-videos/small.webm type=video/webm>
<source src=http://techslides.com/demos/sample-videos/small.ogv type=video/ogg>
<source src=http://techslides.com/demos/sample-videos/small.mp4 type=video/mp4>
<source src=http://techslides.com/demos/sample-videos/small.3gp type=video/3gp>
</video>
@sdrew
sdrew / Procfile
Last active July 27, 2021 15:25
Laravel configs for Heroku/Dokku
web: vendor/bin/heroku-php-apache2 public/