Skip to content

Instantly share code, notes, and snippets.

View anuragkanungo's full-sized avatar

Anurag Kanungo anuragkanungo

  • Voxel
  • San Francisco
View GitHub Profile
class LanguagePackTest(KALiteDistributedBrowserTestCase):
def register_device(self):
z = Zone.objects.create(name='test_zone')
DeviceZone.objects.create(zone=z, device=Device.get_own_device())
Settings.set("registered", True)
def is_language_installed(self,lang_code):
flag = False # flag to check language de is installed or not
describe Foo do
describe "Equality" do
it "is reflexive" do
foo = Foo.new(1,2)
expect(foo).to eq(foo)
end
describe "is symmetric" do
class Foo
attr_reader :x, :y
def initialize(x,y)
@x = x
@y = y
end
def ==(other)
if !self.instance_of?(other.class)
require ‘chef/provisioning'
machine 'db' do
recipe 'mysql'
tag 'itsa_me'
converge true
end
machine 'web1' do
@anuragkanungo
anuragkanungo / taxonomy.js
Last active December 17, 2015 00:33
Taxonomy
E.g. Standard 5 -> Mathematics -> Fractions -> Vulgar Fractions -> Rewriting Vulgar Fractions.
This could all be exported as a JSON object in this way:
{
"title": "Standard 5",
"description": "Lorem ipsum",
"children": [
{
"title": "Mathematics",
"description": "Mathematics for Standard 5",