Skip to content

Instantly share code, notes, and snippets.

1) ListController indexes allows users to filter on a set of topic ids
Failure/Error: parsed["topic_list"]["topics"].length.should == 1
expected: 1
got: 0 (using ==)
# ./spec/controllers/list_controller_spec.rb:35:in `block (3 levels) in <top (required)>'
2) Site omits categories users can not write to from the category list
Failure/Error: Site.new(Guardian.new(user)).categories.count.should == 2
expected: 2
got: 1 (using ==)
~/Poetry/fast_stack (master) → ber compile
mkdir -p lib/fast_stack
mkdir -p tmp/x86_64-darwin12.3.0/fast_stack/2.0.0
cd tmp/x86_64-darwin12.3.0/fast_stack/2.0.0
/Users/regis/.rvm/rubies/ruby-2.0.0-p195/bin/ruby -I. ../../../../ext/fast_stack/extconf.rb
creating Makefile
cd -
cd tmp/x86_64-darwin12.3.0/fast_stack/2.0.0
make
compiling ../../../../ext/fast_stack/fast_stack.c
@ZogStriP
ZogStriP / ember.js-star-rating.html
Last active December 18, 2015 18:09
Star ratings example in Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.4/handlebars.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.4/ember.min.js"></script>
</head>
<style>
.rating {
unicode-bidi: bidi-override;
@ZogStriP
ZogStriP / ember.js-planning.html
Last active December 18, 2015 14:19
Planning example in Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.4/handlebars.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.4/ember.min.js"></script>
</head>
<body>
<script type="text/x-handlebars">
{{outlet}}
@ZogStriP
ZogStriP / ember.js-with-google-maps.html
Created May 31, 2013 13:32
How to use Google Maps with Ember.js
<!DOCTYPE html>
<html>
<head>
<script src="//code.jquery.com/jquery-1.9.1.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/handlebars.js/1.0.0-rc.3/handlebars.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/ember.js/1.0.0-rc.3/ember.js"></script>
<script src="//maps.googleapis.com/maps/api/js?sensor=false"></script>
</head>
<body>
<script>
@ZogStriP
ZogStriP / currentcost.py
Last active December 14, 2015 04:59
script used to publish currentcosts' temperature and wattage data to cosm through a raspberry pi
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import serial
import re
from datetime import datetime
import requests
temp = re.compile('<tmpr>(.+)</tmpr>')