Skip to content

Instantly share code, notes, and snippets.

import Controller from '@ember/controller';
export default class ApplicationController extends Controller {
appName = 'Ember Twiddle';
}
import Ember from 'ember';
export default Ember.Controller.extend({
appName: 'Ember Twiddle'
});
<?php
$options = array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => false,
PDO::ATTR_STRINGIFY_FETCHES => false
);
$db = new PDO('mysql:host=127.0.0.1;dbname=test', $user, $pass, $options);
<?php
require_once '../vendor/autoload.php';
// Create the Transport
$transport = (new Swift_SmtpTransport('localhost', 1025));
// Create the Mailer using your created Transport
$mailer = new Swift_Mailer($transport);
// Create a message
./configure \
--prefix=/usr \
--with-libdir=lib64 \
--with-config-file-path=/etc/php5 \
--enable-libxml \
--enable-filter \
--enable-session \
--enable-xml \
--enable-simplexml \
--enable-inline-optimization \
Bringing machine 'hsb' up with 'virtualbox' provider...
==> hsb: Importing base box 'puphpet/ubuntu1404-x64'...
==> hsb: Matching MAC address for NAT networking...
==> hsb: Checking if box 'puphpet/ubuntu1404-x64' is up to date...
==> hsb: Setting the name of the VM: W2HORW_hsb_1464985745315_33595
==> hsb: Clearing any previously set network interfaces...
==> hsb: Preparing network interfaces based on configuration...
hsb: Adapter 1: nat
hsb: Adapter 2: hostonly
==> hsb: Forwarding ports...
<?php
require 'functions.php';
clickme();
function block(username) { setInterval(() => $('.robin--username').filter((_, node) => node.textContent === username).map((_, node) => { node.parentNode.style.display = 'none'}), 10)}
<ul>
<?php foreach($files as $file): ?>
<li><?=$file?></li>
<?php endforeach; ?>
</ul>
<?php
switch($foo) {
case 1:
echo $this->foo['bar'];
break;
case 2:
echo $this->foo['baz'];
doSomething();
break;