Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am jamierumbelow on github.
  • I am jamierumbelow (https://keybase.io/jamierumbelow) on keybase.
  • I have a public key ASBd4N5V6PPLdK14Zb2lDASpWKTFXy6aDjbP3jwCai6vAQo

To claim this, I am signing this object:

<?php
// ltr
$curriedStrpos = curry('strpos', 'haystack');
$this->assertEquals(1, $curriedStrpos('a'));
$this->assertEquals(4, $curriedStrpos('t'));
<!-- HTML generated using hilite.me --><div style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.2em .6em;"><pre style="margin: 0; line-height: 125%"><span style="color: #557799">&lt;?php</span>
<span style="color: #008800; font-weight: bold">use</span> Illuminate\Contracts\Encryption\Encrypter;
<span style="color: #008800; font-weight: bold">public</span> <span style="color: #008800; font-weight: bold">function</span> <span style="color: #0066BB; font-weight: bold">getEmailAttribute</span>(<span style="color: #996633">$value</span>)
{
<span style="color: #008800; font-weight: bold">return</span> <span style="color: #996633">$value</span> <span style="color: #333333">?</span> app(Encrypter<span style="color: #333333">::</span><span style="color: #0000CC">class</span>)<span style="color: #333333">-&gt;</span><span style="color: #0000CC">decrypt</span>(<span style="color: #996633">$value</span>) <span style="color: #333333">:</span> <span style="
<?xml version="1.0" encoding="UTF-8" ?>
<Response>
<Say voice="woman">You are not as wonderful as you think you are.</Say>
</Response>
@jamierumbelow
jamierumbelow / gist:ab3df399d282f70d0b28
Last active August 29, 2015 14:01
Does Searle succeed in establishing his claim that consciousness is a systemic property?

Does Searle succeed in establishing his claim that consciousness is a systemic property?

Biological naturalism, the view that consciousness is a systemic property, is a view put forward by John R. Searle as a possible answer to the mind-body problem. There are, of course, several different ‘mind-body’ problems, but the one that most concerns Searle is the relationship between consciousness and physical brain processes.

In this essay I will begin by outlining Searle’s position of biological naturalism and discuss its key strength. I will then look at some common criticisms of the view, particularly the argument concerning the irreducibility of the first-person. Finally, I will briefly look at the view that biological naturalism is actually a form of property dualism, before concluding that Searle’s claim that consciousness is a systemic property is ultimately unconvincing.

Searle doesn’t accept a functionalist definition of mental states because of the problem of qualia – how can we define the subjective

$(".filter-list").find("input:checkbox").on "click", ->
childrenSelected = []
typeSelected = []
$('.filter-children input:checked').each -> childrenSelected.push($(this).attr('rel'))
$('.filters input:checked').each -> typeSelected.push($(this).attr('rel'))
selectors = []
if childrenSelected.length > 0
@jamierumbelow
jamierumbelow / freeagent.php
Created January 20, 2014 14:44
FreeAgent Referrer Code Competition
<?php
/**
* tl;dr - https://twitter.com/jamierumbelow/status/425274669152079872
*
* The Story:
*
* I posted a message on Twitter asking if anybody used FreeAgent, and if they had a referral code.
* Upon referring a new customer, both you and 'the referred' get an lifetime discount.
*
* I receieved five replies almost instantaneously, from @chadtomkiss, @_beneverard, @IainMcPherson,
@jamierumbelow
jamierumbelow / a.php
Created January 5, 2014 18:31
Which do you prefer?
<?= Tuxedo::form($article, function($f){ ?>
<h2><?= $f->title ?></h2>
<?= $f->fieldset('Content', function($f){ ?>
<?= $f->text('title') ?>
<?= $f->textarea('body') ?>
<?php }); ?>
@jamierumbelow
jamierumbelow / Tuxedo.php
Last active January 1, 2016 08:09
Give your Laravel forms a little jazz! THIS IS A REALLY EARLY PROTOTYPE so don't expect it to work too well. Check out the example view code beneath to see, vaguely, how it works. Outputs Bootstrap 3 friendly HTML.
<?php
/**
* Tuxedo
* Give your forms a little jazz
*
* @author Jamie Rumbelow <http://jamierumbelow.net>
*/
class Tuxedo {
static protected $_model;
@jamierumbelow
jamierumbelow / pi.rb
Created June 19, 2013 10:51
Playing around with calculating π
# Using a simple Gregory-Leibniz series we can calculate π
# to, theoretically, any degree of accuracy. The series converges very
# slowly however, so it'll take 500,000 iterations to get the first five
# digits of π.
#
# This series can be expressed algebraically like so:
#
# ∞
# Σ (-1)^i * ( 4 / 2i + 1 )
# i=0