Skip to content

Instantly share code, notes, and snippets.

View adamkiss's full-sized avatar
🐱
Cats are awesome.

Adam Kiss adamkiss

🐱
Cats are awesome.
View GitHub Profile
@adamkiss
adamkiss / gist:2484276
Created April 24, 2012 22:19
ProcessWire user access 909 (uber-advanced)
<?php
//This just blew my mind
//
//User has field 'userPages'[Pagefield type], where administrator added parts of whole tree avail. to user.
//This checks whether current page (wrapped in object) or any of its parents was added to this 'userPages'
//(thus current page or anything higher in the hierarchy gives user the access)
//wow.
$access =
count(
@adamkiss
adamkiss / gist:2397520
Created April 16, 2012 10:20 — forked from axelav/gist:1839777
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@adamkiss
adamkiss / gist:1291526
Created October 16, 2011 22:39
Testing HTML gist for inclusion
<!doctype html>
<?php
//testing php inline like a motherfucker
$test = (is_highlighted()) ? 'true' : false;
$test++;
?>
<html>
<head>