Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<id>versions/channels/all</id>
<title>Versions (all)</title>
<updated>2016-10-05T13:09:06Z</updated>
<link rel="alternate" href="http://download.getsmithers.com/feed/channel/all.atom"/>
<generator>Feed for Node.js</generator>
<entry>
<title type="html"><![CDATA[0.4.7]]></title>
<id>http://download.getsmithers.com/download/version/0.4.7</id>
@RobinMalfait
RobinMalfait / enhance_setstate.js
Last active September 13, 2016 21:33
I wonder if there is a way to override/enhance setState. I keep getting this error: http://d.pr/i/LVAF+ and http://d.pr/i/X2Vo+ so I wonder if this is do-able?
/**
* I want to write a HOC, that can intercept the setState functionality
*
* For some context: I'm writing a personal assistant: https://github.com/SmithersAssistant/Smithers
* and I have a plugin system, now I want to store the state of plugins into localStorage
* so that later on I can restore the state
*
* Ideally I would want something like this:
*/
const NOOP = () => {}

Much markdown

  • such
  • cool

wow

@RobinMalfait
RobinMalfait / fa-icons.json
Created April 7, 2016 09:06 — forked from james2doyle/fa-icons.json
A big list (JSON object) of the font awesome icons as of 4.5.0
{
"fa-500px": "500px",
"fa-adjust": "Adjust",
"fa-adn": "Adn",
"fa-align-center": "Align Center",
"fa-align-justify": "Align Justify",
"fa-align-left": "Align Left",
"fa-align-right": "Align Right",
"fa-amazon": "Amazon",
"fa-ambulance": "Ambulance",
{
"name": "Tutorial 0.0.1",
"author": {
"name": "Robin Malfait",
"email": "malfait.robin@gmail.com"
}
}
@RobinMalfait
RobinMalfait / code.md
Last active December 10, 2015 21:26
Crack that code :)

Hoe heb ik de code gekraakt?

"http://Yml0Lmx5/" + 1 + ([]+!!-[])[(1<<1)+1] + (1<<1) + (("".constructor)+'')[(1<<4)-(1<<1)] + 'zK' + (([][+[]]+{})[1<<1])

Je merkt op dat de code een link moet zijn, vermits Yml0Lmx5 geen geldige url is, moet deze ook nog omgezet worden. In het tweede deel merk je arrays op [], en bit-shifting (1<<4), dit wordt vaak gebruikt bij javascript. Je kan ook nog afleiden dat het javascript door het feit dat je 'zK' met single quotes kan gebruiken (meestal zijn single quotes voor characters, en geen strings).

TL;DR: 1 + ([]+!!-[])[(1<<1)+1] + (1<<1) + (("".constructor)+'')[(1<<4)-(1<<1)] + 'zK' + (([][+[]]+{})[1<<1]) (1s2gzKd) kan je letterlijk in je google chrome devtools > console plakken.

<?php namespace KBC\Accounts;
use KBC\Accounts\Events\AccountWasDeleted;
use KBC\Accounts\Events\AccountWasOpened;
use KBC\Accounts\Events\MoneyWasWithdrawn;
use KBC\Accounts\Events\MoneyWasDeposited;
use KBC\Core\BaseModel;
final class Account extends BaseModel
{

OO Programmeren II

OO Paradigm

  • Abstractie - "klas":
    • "domein"-klasse
    • "ui"-klassen
  • Inkapseling => Private
  • Overerving => "her"gebruik van code. Via extends
  • Polymorfisme

Oefeningen 1.4 · Slide 15 - 17

Oefening 1.4.1

In de voorbeelden werden twee verschillende oplossingsmethodes bekeken voor het bepalen van het aantal priemgetallen kleiner dan een gegeven waarde n. Werk beide methodes uit voor n = 10.

    n = 10
@RobinMalfait
RobinMalfait / about.md
Last active August 29, 2015 14:15
Laravel Collective About Page

The Laravel Collective team makes sure your day-to-day packages are still alive. If you used to use annotations or html forms, you can find them here. Those packages are packages that were intended to be on the laravel core, but the features you get out of the packages aren't core related.

Our team exists of active laravel members, you can find us on twitter, irc or several forums.