Skip to content

Instantly share code, notes, and snippets.

<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
@Impossibeard
Impossibeard / pong.html
Created October 22, 2016 10:29
Bloc Pong
<!DOCTYPE HTML>
<html>
<head>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
var blocTime = angular.module('blocTime', ['ui.router', 'firebase']);
class ApiConstraints
def initialize(options)
@version = options[:version]
@default = options[:default]
end
def matches?(req)
@default || req.headers['Accept'].include?("application/vnd.marketplace.v#{@version}")
end
end
Failures:
1) CharactersController GET #index assigns [my_character] to @characters
Failure/Error: expect(assigns(:characters)).to eq([my_character])
expected: [{"id"=>1, "user_id"=>1, "name"=>"Beast of Hearts", "level"=>1, "current_xp"=>0, "strength"=>12, "dex...reated_at"=>2016-08-15 03:36:55.737822000 +0000, "updated_at"=>2016-08-15 03:36:55.737822000 +0000}]
got: #<ActiveRecord::Relation [#<Character id: 1, user_id: 1, name: "Beast of Hearts", level: 1, current_x...hp: 2, proficiency_bonus: 2, created_at: "2016-08-15 03:36:55", updated_at: "2016-08-15 03:36:55">]>
(compared using ==)
(function(){
function AlbumCtrl() {
albumData = angular.copy(albumPicasso);
this.title = albumData.title;
this.artist = albumData.artist;
}
angular
.module('blocJams')
.controller('AlbumCtrl',AlbumCtrl);
var findParentByClassName = function (startingNode, parentClass){
var currentNode = startingNode.parentNode;
while (currentNode != null && !currentNode.classList.contains(parentClass)){
currentNode = currentNode.parentNode;
};
$(document).ready(function(){
// $('.embedly').embedly({
// key: '7918a7b91ef74f3790e4e9d15e0f7aa2'
// });
$('.embedlink').on('keyup', function(){
console.log("keyup");
var message = $('<span class="insert">Type in the URL of the site you would like to embed an image from.</span>');
if($('#post_embedlink').val().length > 0){
@Impossibeard
Impossibeard / Screenshot
Created April 2, 2016 03:56
Properly functioning app, but Embedly loads after Masonry, so images stack
http://postimg.org/image/mzfb08kh3/
$(document).ready(function(){
// $('.embedly').embedly({
// key: '7918a7b91ef74f3790e4e9d15e0f7aa2'
// });
$('.embedlink').on('keyup', function(){
console.log("keyup");
var message = $('<span class="insert">Type in the URL of the site you would like to embed an image from.</span>');
if($('#post_embedlink').val().length > 0){