Skip to content

Instantly share code, notes, and snippets.

# Using the .to chainable
expect(1).to.equal(1);
# Using the .to and .be chainables
expect(1).to.be.an('Int');
use reflection;
class Animal {
func Animal (self, name) {
self.name = name;
}
func canBark (self) {
reflection.hasAttribute (self, "bark");
}
func main (args) {
if (args.getSize () == 0) {
print ("Hello, world!");
}
print ("Hello, {}".format (args [0]));
}
#!/usr/bin/mono /usr/lib/iodine/bin/iodine.exe
func main() {
print("Content-type: text/html\n");
print("<p>Insert HTML here!</p>");
}
@Aurora0000
Aurora0000 / Descant Vagrant configuration
Created June 12, 2015 15:50
Use this to setup nginx with Docker/Vagrant for Descant.
server {
listen 80;
server_name example.com;
access_log /path/to/descant/access.log;
error_log /path/to/descant/error.log;
location /static {
root /path/to/descant/static;
}
class Choice(models.Model):
...
class Vote(models.Model):
author = models.ForeignKey('auth.User')
vote_choice = models.ForeignKey(Choice)
# Example
c = Choice(...)