Skip to content

Instantly share code, notes, and snippets.

View niieani's full-sized avatar

Bazyli Brzóska niieani

View GitHub Profile
@niieani
niieani / gist:1213709
Created September 13, 2011 12:33
PHP Camel Case functions
<?php
// source: http://www.paulferrett.com/2009/php-camel-case-functions/
/**
* Translates a camel case string into a string with underscores (e.g. firstName -&gt; first_name)
* @param string $str String in camel case format
* @return string $str Translated into underscore format
*/
function from_camel_case($str) {
$str[0] = strtolower($str[0]);
@niieani
niieani / XFormatterHelper.php
Created September 29, 2011 12:54
XFormatterHelper for Symfony2 Console - formatting multiple blocks side-by-side
<?php
/**
* By: Bazyli Brzóska
* Date: 25.09.2011
* Time: 01:09
*/
namespace Tools;
use \Symfony\Component\Console\Helper\FormatterHelper;
@niieani
niieani / bash-infinity-example.sh
Last active August 29, 2015 14:15
Example usage of Bash Infinity Framework ( http://invent.life/project/bash-infinity-framework )
# See info @ http://invent.life/project/bash-infinity-framework
Human Bazyli
Bazyli.height = 100
# calls a function with a parameter
Bazyli.Eat strawberries
Bazyli.Eat lemon
# calls tostring method

Keybase proof

I hereby claim:

  • I am niieani on github.
  • I am bazyli (https://keybase.io/bazyli) on keybase.
  • I have a public key whose fingerprint is D887 700A A775 C40D 681A FBDF 5E6C A5FE 9FAB 5C55

To claim this, I am signing this object:

@niieani
niieani / app.html
Created March 25, 2016 00:01
Aurelia Gist [computedFrom not applying]
<template>
<nav class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li repeat.for="row of router.navigation" class="${row.isActive ? 'active' : ''}">
<a data-toggle="collapse" data-target="#bs-example-navbar-collapse-1.in" href.bind="row.href">${row.title}</a>
</li>
</ul>
<div class="loader" if.bind="router.isNavigating">
@niieani
niieani / app.html
Last active January 10, 2017 15:18 — forked from jdanyow/app.html
Aurelia Gist
<template>
<require from="./test"></require>
compose: <compose view="test.html" view-model.bind="testInstance"></compose>
<hr/>
test: <test view-model.bind="testInstance"></test>
</template>
@niieani
niieani / app.html
Last active September 14, 2016 13:00
Aurelia Gist [to document]
<template>
<require from="./test"></require>
compose: <compose view="test.html" view-model.bind="testInstance"></compose>
<hr/>
test: <compose view-model.bind="testInstance"></compose>
<div as-element="compose" view-model.bind="testInstance"></div>
</template>
@niieani
niieani / app.html
Last active September 7, 2021 13:54 — forked from jdanyow/app.html
Aurelia RequireJS Gist
<template>
<!-- Simple usage: -->
<h1>message: ${async(message).value}</h1>
<!-- With a placeholder: -->
<h1>message: ${async(message).value ? async(message).value : '...'}</h1>
</template>
@niieani
niieani / app.html
Last active April 18, 2016 20:51
Aurelia: Suboptimal repeat element lifecycle [alternative without compose]
<template>
<require from="./component"></require>
<input type="checkbox" ref="isFiltering">
<br>
<component
repeat.for="id of components | without8: isFiltering.checked"
id.bind="id"
></component>
</template>
@niieani
niieani / app.html
Last active April 17, 2016 17:41
Aurelia: Suboptimal repeat element lifecycle [alternative swap arrays]
<template>
<require from="./component"></require>
<button click.delegate="swapArrays()">Swap arrays</button>
<br>
<component
repeat.for="id of components"
id.bind="id"
></component>