This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:- use_module(library(gensym)). | |
:- dynamic student/3. | |
do_stuff:- | |
gensym(student, S1), | |
gensym(student, S2), | |
assertz(student(S1, john, doe)), | |
assertz(student(S2, jane, doe)). | |
show_id_of_john :- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
var pg = require('pg'); | |
var constr = 'postgres://devel:[email protected]/tcc'; | |
var total = 0; | |
setInterval(function() { | |
console.log('Total connect ' + total); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
digit(D) --> [D],{member(D, `0123456789`)}. | |
digits([D]) --> digit(D). | |
digits([D|Ds]) --> digit(D), digits(Ds). | |
number_term(N) --> digits(D), {number_codes(N, D)}. | |
infix_op(add) --> `+`. | |
infix_op(sub) --> `-`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var geocoder = require('geocoder'); | |
var Promise = require('bluebird'); | |
function query(location) { | |
console.log("Geocoding: %s", location); | |
var locator = Promise.defer(); | |
geocoder.geocode(location, function(err, data) { | |
if (err !== null || data.results === undefined || data.results.length < 1) { | |
console.log("%s results: false", location); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Nginx cache busting rewriter, best used on assets that have long-lived expires. | |
# | |
# Rewrites like so: | |
# blah.com/release_ab2ea212312.../file.css => blah.com/file.css | |
# | |
location ~ ^/release_(.*?)/ { | |
rewrite ^/release_(.*?)/(.*)$ /$2 last; | |
} |