Skip to content

Instantly share code, notes, and snippets.

View bsideup's full-sized avatar

Sergei Egorov bsideup

View GitHub Profile
CompilerConfiguration configuration = new CompilerConfiguration()
configuration.disabledGlobalASTTransformations = Collections.singleton(MacroTransformation.name);
def normalShell = new GroovyShell(configuration);
def macroShell = new GroovyShell();
def r = benchmark {
'macro' {
macroShell.evaluate """
assert "bytes" == propertyName("".bytes)
"""
given:
Integer a
Integer b
match:
a.equals(b)
replaceWith:
a == b

Keybase proof

I hereby claim:

  • I am bsideup on github.
  • I am bsideup (https://keybase.io/bsideup) on keybase.
  • I have a public key whose fingerprint is 08B0 9F78 7B67 45E7 96CE 6DBE 1003 06F2 B379 3BF3

To claim this, I am signing this object:

@bsideup
bsideup / ITestViewController.as
Created November 16, 2011 14:41
IViewController example
package view.testView
{
import tl.viewController.IVIewController;
public interface ITestViewController extends IVIewController, ITestViewDelegate
{
}
}
@bsideup
bsideup / DSL.as
Created December 5, 2011 17:06
simple ActionScript DSL :)
package
{
import flash.display.Sprite;
import flash.events.Event;
[SWF(frameRate="1")]
public class DSL extends Sprite
{
private var myModel : MyModel = new MyModel();
@bsideup
bsideup / wtf.as
Created December 13, 2011 08:11
Stack context error
package
{
import flash.display.Sprite;
public class FunctionCallTests extends Sprite
{
public function FunctionCallTests()
{
traceMyArgs( $[this, "yo"] );
}
@bsideup
bsideup / gist:4013613
Created November 4, 2012 20:33
Typical Trylogic Framework bootstrap
<?xml version="1.0"?>
<native:Bootstrap xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:native="http://www.trylogic.ru/native"
xmlns:services="ru.trylogic.dummy.services.*"
xmlns:trylogic="http://www.trylogic.ru/ioc/">
<fx:Metadata>
[SWF(width="1024", height="768", frameRate="60", backgroundColor="0x909090")]
</fx:Metadata>
@bsideup
bsideup / gist:4013873
Created November 4, 2012 21:33
ViewExample
<?xml version="1.0"?>
<gui:ContainerBase xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:gui="http://www.trylogic.ru/gui"
xmlns:trylogic="http://www.trylogic.ru/"
xmlns:s="library://ns.adobe.com/flex/spark">
<gui:controllerClass>ru.trylogic.dummy.views.dummyApplicationView.DummyApplicationViewController</gui:controllerClass>
<gui:eventMaps>
<trylogic:EventMap source="{myButton}" type="tap" destination="{new Event('myButtonTapped')}" />
#!/bin/bash
echo -e "\n\n\n" | ssh-keygen -t rsa
ssh-keyscan -H github.com >> ~/.ssh/known_hosts
ls -la ~/.ssh/
#!/bin/bash
echo "Hello, world!"