Skip to content

Instantly share code, notes, and snippets.

@kallepersson
kallepersson / MMO.md
Last active January 3, 2016 06:49
What if Bash was an MMO-MUD?

What if Bash was an MMO-MUD?

  • You SSH to get access to this world
  • All players are represented by users
  • No standard GNU/UNIX commands are enabled

Locations are folders:

  • ".." as a concept does not exist but rather the world is bound together by linked folders
  • Symbolic links can also be portals of sorts
  • The system keeps track of all users' CWD and you can "see each other" if you are in the same directory
//TDGameViewController
- (void)spawnMob
{
if([self.waypoints count] > 1) {
TDMob *mob = [[TDMob alloc] initWithStartingWaypoint:[self.waypoints objectAtIndex:0]];
[mob setTargetWaypoint: [self.waypoints objectAtIndex:1]];
[self.scene addChild:mob];
}
}
<?php
/**
* TmSectionHeader class file.
* @author Kalle Persson <kp@afonsowilsson.se>
* @copyright Copyright &copy; Afonso Wilsson 2013 -
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @package tm.widgets
* @since 1.0
*/
<?php
Yii::import( 'ext.webdriver-bindings.CWebDriverTestCase' );
class ExampleTest extends CWebDriverTestCase {
public function testGoogle() {
$this->get( 'http://www.google.com/' );
$qElem = $this->findElementBy( LocatorStrategy::name, 'q' );
$this->assertNotNull( $qElem, 'There is no "query" element!' );
#include <stdlib.h>
#include <iostream>
using namespace std;
//dog.h
class Dog {
public:
Dog(string name);
string say_hello();
private:
<?php
class SiteTest extends WebTestCase
{
private $username = 'epicuser';
private $password = 'supersecretpassword';
private $order_customer_data = array(
'Customer[uid]' => '8705081337',
<table>
<tr>
<th><strong>Abonnemang</strong></th>
<th></th>
</tr>
<?
foreach($model->rules as $rule) {
echo '<tr>';
echo '<td>'.$rule->operator.' '.$rule->group_name.'</td>';
if(!$model->isUsedInOrder()) {
<div class="span3" id="PackSubscriptionRulePreview"><link rel="stylesheet" type="text/css" href="/id/www/assets/eab8319/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/id/www/assets/eab8319/css/bootstrap-yii.css">
<table>
<tbody><tr>
<th><strong>Abonnemang</strong></th>
<th></th>
</tr>
<tr><td>Foo</td><td><a id="rule12" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Foo</td><td><a id="rule13" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Tele2 Maxi</td><td><a id="rule14" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Foo</td><td><a id="rule15" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Foo</td><td><a id="rule16" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Foo</td><td><a id="rule17" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Foo</td><td><a id="rule18" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Foo/td><td><a id="rule19" href="#"><i class="icon-remove"></i></a></td></tr><tr><td>Fooe</td><td
//model
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'id' => 'ID',
//model
/**
* @return array customized attribute labels (name=>label)
*/
public function attributeLabels()
{
return array(
'id' => 'ID',