Skip to content

Instantly share code, notes, and snippets.

@bilalq
bilalq / TreeNode.java
Created December 7, 2012 21:59
The node for the BST
public class TreeNode
{
private Comparable value;
TreeNode left, right;
public TreeNode(Comparable initValue)
{
value = initValue;
left = null;
right = null;
<Alloy>
<Window title="Comments" id="gameComments">
<LeftNavButton>
<Button id="leftButton" title="Back" onClick="popWindow" />
</LeftNavButton>
<TableView id="commentsTable" />
<View id="writeComment">
<TextField id="commentText"/>
<Button id="sendBtn" />
</View>
@bilalq
bilalq / git-remote-hg
Created February 21, 2013 01:33
Felipec's git-remote-hg file with that emulates git's push behaviour. I modified it a little to not complain as often.
#!/usr/bin/env python
#
# Copyright (c) 2012 Felipe Contreras
#
# Inspired by Rocco Rutte's hg-fast-export
# Just copy to your ~/bin, or anywhere in your $PATH.
# Then you can clone with:
# git clone hg::/path/to/mercurial/repo/
@bilalq
bilalq / create_users_table.php
Created May 2, 2013 04:40
Sample migration for L3.
<?php
class Create_Users_Table {
/**
* Make changes to the database.
*
* @return void
*/
public function up() {
@bilalq
bilalq / example.php
Created May 26, 2013 05:35
PHP 5.4 advantages
<?php
// Array Literal support
$my_array = [
'you can use',
'[]',
'now'
];
// This used to be a parse error in PHP 5.3.
@bilalq
bilalq / ie8_$q.sjs
Created May 17, 2014 09:45
Sweet $q Promise methods for IE8
/**
* Macros to make $q Promises better in IE8
*
* Tested with v0.6.0 of sweet.js
*/
/**
* These operator macros will take `.catch` and `.finally` method invocations
* and transform them into IE8 safe variants.
*/
@bilalq
bilalq / .ideavimrc
Created June 4, 2014 21:08
My .ideavimrc
inoremap jj <Esc>`^
set ignorecase
set smartcase
set scrolloff=3
set history=1000