This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Windows.Forms; | |
public class Chorus { | |
Dog fluffles; | |
Dog jake; | |
Dog harry; | |
Dog kim; |
This file contains hidden or 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
// JavaScript Document | |
function Fish(na, im, w, h, sw, sh, sf) { | |
/* Private Var Declarations */ | |
var name = na; | |
var image = im; | |
var height = h; | |
var width = w; | |
var start_height = sh; |
This file contains hidden or 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
header('Content-type: text/xml'); | |
$term = $_GET['value']; | |
$col = $_GET['column']; | |
$xmlDom1 = new DOMDocument(); | |
$xmlString = ''; | |
foreach ( file("http://stuweb.cms.gre.ac.uk/~mg109/COMP1688/index.php?col=$col&term=$term" ) as $node ) { | |
$xmlString .= trim($node); | |
} |
This file contains hidden or 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
#! /usr/bin/env php | |
<?php | |
require_once 'vendor/autoload.php'; | |
use Symfony\Component\Console\Application; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\Input\InputArgument; |
This file contains hidden or 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
<?php | |
// Show Contact | |
public function contact() | |
{ | |
return View::make('pages.about.contact')->withInput([]); | |
} | |
// Process Contact | |
public function processContact() |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am Duffleman on github. | |
* I am duffleman (https://keybase.io/duffleman) on keybase. | |
* I have a public key whose fingerprint is 695B AA12 2ECF 024C FFCF DD55 EFE1 8E88 7921 BFC1 | |
To claim this, I am signing this object: |
This file contains hidden or 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
private function copy($table, $changes = array(), $matches = array(), $ignoreID = true) { | |
if(is_array($table)) { | |
$oldTable = $table[0]; | |
$newTable = $table[1]; | |
} else { | |
$oldTable = $table; | |
$newTable = $table; | |
} |
This file contains hidden or 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
<?php | |
// Imagine this extends Eloquent Model | |
class Article { | |
protected $image; | |
protected $api; | |
// You don't inject the Image or the API | |
// But you do build them up inside the Model. |
This file contains hidden or 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
<?php | |
namespace spec\Pushman\PHPLib; | |
use GuzzleHttp\Client; | |
use GuzzleHttp\Message\Response; | |
use GuzzleHttp\Stream\Stream; | |
use GuzzleHttp\Subscriber\Mock; | |
use PhpSpec\ObjectBehavior; | |
use Prophecy\Argument; |
This file contains hidden or 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
<?php | |
function ack($m, $n) | |
{ | |
if (!is_integer($m) or ! is_integer($n)) { | |
throw new Exception('$m and $n must be integers.'); | |
} | |
if ($m == 0) { | |
return $n + 1; |
OlderNewer