Skip to content

Instantly share code, notes, and snippets.

View simonmilz's full-sized avatar

Simon Milz simonmilz

View GitHub Profile
<?php
class User {
protected $email;
protected $password;
public function is($role = 'user') {}
public function login($email, $pass) {}
public function isLoggedin() {}
getEmail
@simonmilz
simonmilz / server.ini
Created March 8, 2015 21:53
hhvm server.ini example for 18gb RAM Root-Server
; php options
pid = /var/run/hhvm/pid
; hhvm specific
hhvm.server.port = 9000
hhvm.server.type = fastcgi
hhvm.server.default_document = index.php
hhvm.log.use_log_file = true
hhvm.log.file = /var/log/hhvm/error.log
hhvm.repo.central.path = /var/run/hhvm/hhvm.hhbc
@simonmilz
simonmilz / vhost
Created October 18, 2014 20:28
FastCGI for HHVM
<IfModule mod_fastcgi.c>
<FilesMatch \.php$>
SetHandler hhvm-php-extension
</FilesMatch>
<FilesMatch \.hh$>
SetHandler hhvm-hack-extension
</FilesMatch>
Alias /hhvm /hhvm
@simonmilz
simonmilz / tine20-getRegistryForApp.js
Last active August 29, 2015 14:03
Ger current config for an application
// This command will get the current config of the "Document"-Application
var cfg = Tine.Document.registry.get('config');
@simonmilz
simonmilz / tine20-currentAccount.js
Last active August 29, 2015 14:02
Get current Account in JavaScript in Tine 2.0
/*
account = {
accountDisplayName: "Milz, Simon"
accountEmailAddress: "[email protected]"
accountExpires: null
accountFirstName: "Simon"
accountFullName: "Simon Milz"
accountHomeDirectory: null
accountId: "38f566d4f6e648a7b4a25eadad260b1db040d076"
accountLastLogin: "2014-07-20 17:56:33"