Skip to content

Instantly share code, notes, and snippets.

'use strict';
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
var mountFolder = function (connect, dir) {
return connect.static(require('path').resolve(dir));
};
module.exports = function (grunt) {
// load all grunt tasks
require('matchdep').
filterDev('grunt-*').
@DavidMikeSimon
DavidMikeSimon / gist:5488593
Created April 30, 2013 13:11
Git info in bash prompt, customized
### http://asemanfar.com/Current-Git-Branch-in-Bash-Prompt
c_red=`tput setaf 1`
c_green=`tput setaf 2`
c_sgr0=`tput sgr0`
parse_git_branch ()
{
if git rev-parse --git-dir >/dev/null 2>&1
then
1. Implement UserInterface to be a shell around the phpbb user system
2. Implement UserProviderInterface to hand back the prior UserInterface implementation
3. Implement AuthenticationSuccessHandlerInterface to set the phpbb session key
4. Implement logout page to unset the phpbb session key
framework:
#esi: ~
translator: { fallback: en }
secret: %secret%
router:
resource: "%kernel.root_dir%/config/routing.yml"
strict_requirements: %kernel.debug%
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
ave@shelly: ~
$ mkdir foo
dave@shelly: ~
$ cd foo
dave@shelly: ~/foo
$ git init
Initialized empty Git repository in /home/dave/foo/.git/
@DavidMikeSimon
DavidMikeSimon / foo3 status
Last active December 23, 2015 12:59
OpenStack rpc error
root@zeus:~# nova show foo3
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+
| Property | Value |
+-------------------------------------+-----------------------------------------------------------------------------------------------------------------+
| status | ERROR |
| updated | 2013-09-20T15:26:07Z |
| OS-EXT-STS:task_state | deleting |
| OS-EXT-SRV-ATTR:host | zeus.americancouncils.org
root@zeus:~# nova-manage service list
Binary Host Zone Status State Updated_At
nova-scheduler zeus internal enabled XXX 2013-09-20 14:16:55
nova-conductor zeus internal enabled XXX 2013-09-20 14:16:56
nova-network zeus internal enabled XXX 2013-09-20 14:17:01
nova-compute zeus nova enabled XXX 2013-09-19 20:43:34
nova-consoleauth zeus internal enabled XXX 2013-09-20 14:16:53
nova-cert zeus internal enabled XXX 2013-09-20 14:16:54
nova-compute zeus.americancouncils.org nova enabled :-) 2013-09-20 16:54:16
nova-scheduler zeus.americancouncils.org internal enabled :-) 2013-09-20 16:54:14
@DavidMikeSimon
DavidMikeSimon / gist:6674688
Created September 23, 2013 18:20
zeus ip addr
control@zeus:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
inet 169.254.169.254/32 scope link lo
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br100 state UP qlen 1000
link/ether 00:26:55:dc:ff:c2 brd ff:ff:ff:ff:ff:ff
inet6 fe80::226:55ff:fedc:ffc2/64 scope link
<?php
if ($parent = $cls->getParentClass()) {
if ($parent->hasMethod("acModelTraitsGetMethodMap")) {
$pmap = parent::acModelTraitsGetMethodMap();
$metaMap[$clsname] = array_merge($metaMap[$clsname], $pmap);
}
}
<?php
trait Methods
{
public function __call($name, $args)
{
if (get_parent_class($this)) {
$x = parent::__call($name, $args);
if (!is_null($x)) { return $x; }
}