Skip to content

Instantly share code, notes, and snippets.

View isstaif's full-sized avatar

al-Amjad Tawfiq Isstaif isstaif

View GitHub Profile
@isstaif
isstaif / gist:2730113
Created May 19, 2012 08:46
Prolog Four Winns game
:- dynamic state/3.
:- dynamic top/2.
top(0,0).
play(Color, Col) :-
top(Col, Row), assert(state(Col, Row, Color)),
Next is Row + 1, retract(top(Col, Row)), assert(top(Col, Next)).
@isstaif
isstaif / health-atlas-sample.html
Created June 24, 2012 09:10
A sample of a health atlas map demonstrating the number of hospitals in Syrian provinces using Google Visualization API
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {'packages': ['geochart']});
google.setOnLoadCallback(drawMarkersMap);
function drawMarkersMap() {
var data = new google.visualization.DataTable();
data.addColumn('string', 'City');
@isstaif
isstaif / generate_rdf.rb
Created June 26, 2012 12:51
Simple Ruby RDF generator
require 'csv'
class Observation
attr :id
attr :province
attr :indicator_name
attr :indicator_value
attr :year
attr :dataset
@isstaif
isstaif / app.js
Created July 15, 2012 17:34
A simple example demonstrating how to use Backbone.js models and views
(function($){
var Post = Backbone.Model.extend({
defaults : {
text : "Default post text",
likes : 0
}
});
var Posts = Backbone.Collection.extend({
@isstaif
isstaif / hello.php
Last active December 15, 2015 15:18
Hello, World in PHP
<?php
echo "<u>Hello, World!</u>";
?>
@isstaif
isstaif / gist:5280309
Created March 31, 2013 11:13
Hello, World in HTML!
<html>
<head>
<title>My Website</title>
</head>
<body>
<h1>Title</h1>
<p>Hello, This is a text</p>
@isstaif
isstaif / form.html
Created March 31, 2013 11:16
A simple form in HTML and PHP
<html>
<head></head>
<body>
<form action='http://localhost/home.php'>
Title: <input type=text name=title /><br />
Body: <input type=text name=body />
<input type=submit />
@isstaif
isstaif / list.php
Last active December 15, 2015 15:18
A simple list using PHP
<html>
<head></head>
<body>
<?php
$post1 = array(
'title' => 'Title 1',
@isstaif
isstaif / post.php
Last active December 15, 2015 15:18
A simple template using PHP
<?php
$post = array(
'title' => 'Post title!',
'body' => 'Blah blah blah blah blah blah blah blah blah blah blah '
);
echo "<h1>".$post['title']."</h1>";
echo "<p>".$post['body']."</p>";
echo "<hr />";
@isstaif
isstaif / new.html
Created April 6, 2013 08:45
Simple website using PHP and MySQL
<form action='newpost.php' method=post>
Title: <input type=text name=title />
Body: <input type=text name=body />
<input type=submit />
</form>