Skip to content

Instantly share code, notes, and snippets.

View tmli3b3rm4n's full-sized avatar
:octocat:
Working from home

Tim Lieberman tmli3b3rm4n

:octocat:
Working from home
  • Remote from Atlanta
View GitHub Profile
@denvaar
denvaar / traversal.go
Created February 12, 2017 21:47
Depth and Breadth-first traversal in a binary tree, implemented in Golang
package main
import "fmt"
type node struct {
value string
left *node
right *node
}
@sagivo
sagivo / gist:2983f18ffb811b2fec8b
Last active April 5, 2019 11:09
mergesort in go
func merge_sort(l []int) []int {
if len(l) < 2 {
return l
}
mid := len(l) / 2
a := merge_sort(l[:mid])
b := merge_sort(l[mid:])
return merge(a, b)
}
@zachflower
zachflower / LinkedList.class.php
Last active April 15, 2021 18:33
PHP implementation of a singly linked list.
<?php
class Node {
public $data = NULL;
public $next = NULL;
public function __construct($data = NULL) {
$this->data = $data;
}
}
@xeoncross
xeoncross / composer.md
Last active November 10, 2024 06:52
How composer actually works

Composer

the missing quick-start guide

We will assume we have a package/project called https://github.com/foo/bar

Most redistributable packages are hosted on a version control website such as Github or Bitbucket. Version control repositories often have a tagging system where we can define stable versions of our application. For example with git we can use the command:

git tag -a 1.0.0 -m 'First version.'

With this we have created version 1.0.0 of our application. This is a stable release which people can depend on. If we wanted to include "foo/bar" then we could create a composer.json and specify the tagged release we wanted: