Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
if [ -z "$HIPCHAT_TOKEN" ]; then
echo "HipChat token not found. Please specify \$HIPCHAT_TOKEN."
exit 1
fi
if [ -z "$1" ]; then
echo "Please specify a Maven log file to check for vulnerabilities."
exit 1
fi
(let [gravity 4
max-velocity 50]
(defrule gravity-pulls-things-down
:on :frame-entered
(r/do entities <- (r/get-in-scene :entities)
faller << (r/get-entities-with #{:velocity :gravity :hitbox})
(r/when (not (e/collides-with? entities
faller
:below))
(r/update-entity faller
; before
(fn [{:keys [memory registers] :as system}]
(let [value (memory/load memory
(registers :pc))]
(-> system
(->/in [:registers]
(assoc r value)
(update-in [:pc] inc)))))])
; after
@Beyamor
Beyamor / compile.py
Created February 7, 2014 04:18
Jinja2 Templating Example
# Using Jinja2 as the templating engine,
# this reads and renders some templates named "main-page.template" and "about-me.template",
# outputting "main-page.html" and "about-me.html" respectively.
# (you could call the files whatever you wanted)
#
# Importantly, each HTML template includes another file, "header.html".
#
# You could run the script with `python compile.py`.
# main-page.html
import jsontemplate
import json
import os
import argparse
import time
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
parser = argparse.ArgumentParser()
parser.add_argument("--watch", "-w", action="store_true")
class Maybe:
def __init__(self, value=None):
self.value = value
if self.value:
self.just = True
else:
self.just = False
@staticmethod
def return_(value):

Until 1905 he worked as a baker at Avelghem, a village near Kortrijk.

Berthe-Evelyne Agbo is a writer from Benin who has published poems in French. By 1907, however, there was no sign of national regeneration and the government of the day was making no attempt to control or limit the powers of the Catholic Church. He wrote many book's such as Zindagi, Mehbub-e-Khuda, Deen-e-Islam, Azadi-e-Hind, Mera Afsanah, Jawahraat, Mashooqa-e-Punjab, Shaoor, Dehati rooman, Pakistan and untouchability, Taareekh-e-Ahrar, Dunya may dozakh, Islam and Socialism etc.

After relocating to Canada in 1962, Ondaatje became a Canadian citizen.

In 1980 Shamiakin became the chief editor of the Soviet Belarusian Encyclopedia. Has just completed the 8 part series "SCUP", Which he wrote in English but has been translated into Irish.

Bhagat, an alumnus of Indian Institute of Technology Delhi and Indian Institute of Management Ahmedabad, is seen more as a youth icon than as an author. He was born in Budapest, Austria-Hungary, on March 2

#!/bin/bash
# First, fill in these variables with your Application Name and URL Path:
APPNAME="colton"
URLPATH="/"
# Step 2
# deploy the app
cd $HOME
@behaviour = bt.forever(
bt.branch(
bt.cond(
bt.checkOnce(
behaviours.closeTo(this, (=> @player), 50)),
behaviours.flee(this, (=> @player),
speed: 300
minDistance: 150
)
),
class Canvas
constructor: (@width, @height) ->
@el = $ "<canvas>"
@context = @el[0].getContext "2d"
@el.width width
@el.height height
@context.canvas.width = width
@context.canvas.height = height