Skip to content

Instantly share code, notes, and snippets.

View childnode's full-sized avatar

Marcel Trautwein childnode

View GitHub Profile
@rdingwall
rdingwall / FileHelpersTypeExtensions.cs
Created November 24, 2011 14:07
Set FileHelper's FileHelperEngine.HeaderText via reflection
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
// see http://stackoverflow.com/questions/3975741/column-headers-in-csv-using-filehelpers-library/8258420#8258420
// ReSharper disable CheckNamespace
namespace FileHelpers
// ReSharper restore CheckNamespace
$grid_width:66px;
$grid_space: 16px;
.grid_1, .grid_2, .grid_3, .grid_4, .grid_5, .grid_6, .grid_7, .grid_8, .grid_9, .grid_10, .grid_11, .grid_12 {
display: inline;
float: left;
position: relative;
margin-left: $grid_space / 2;
margin-right: $grid_space / 2;
}
@tcmacdonald
tcmacdonald / application.js
Created March 12, 2012 15:47
Textile WYSIWYG Editor
$.each($('textarea.textile'),function(i,el){
TextileEditor.initialize($(el).attr('id'));
});
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active June 5, 2024 22:16 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@paulirish
paulirish / gist:4158604
Created November 28, 2012 02:08
Learn JavaScript concepts with recent DevTools features

Learn JavaScript concepts with the Chrome DevTools

Authored by Peter Rybin , Chrome DevTools team

In this short guide we'll review some new Chrome DevTools features for "function scope" and "internal properties" by exploring some base JavaScript language concepts.

Closures

Let's start with closures – one of the most famous things in JS. A closure is a function, that uses variables from outside. See an example:

resources:
entities:
'Acme\MyPackage\Domain\Model\User':
Acme_MyPackage_User_Admin: 'ANY'
Acme_MyPackage_User_Me: 'current.securityContext.account.user == this.user && this.user != NULL'
roles:
SimpleUser: []
Administrator: [SimpleUser]
anonymous
anonymous / Settings.xml with SQLite DB
Created December 14, 2012 08:39
Settings:
TYPO3:
FLOW3:
persistence:
backendOptions:
driver: 'pdo_sqlite'
dbname: 'my.sqlite'
user: 'ad'
password: 'dbpass'
core:
anonymous
anonymous / Version20121211145611.php
Created December 14, 2012 08:48
Flow3, Doctrine and SQLite Migrations/Sqlite/Version20121211145611.php
<?php
namespace TYPO3\FLOW3\Persistence\Doctrine\Migrations;
use Doctrine\DBAL\Migrations\AbstractMigration,
Doctrine\DBAL\Schema\Schema;
class Version20121211145611 extends AbstractMigration {
/**
* @param Schema $schema
anonymous
anonymous / flow3 doctrine an SQLite bash output
Created December 14, 2012 08:49
relates to Settings.yaml https://gist.github.com/4283679 and Migrations/Sqlite/Version20121211145611.php https://gist.github.com/4283731
-bash:$ ./flow3 doctrine:entitystatus
Found 12 mapped entities:
[OK] TYPO3\FLOW3\Resource\ResourcePointer
[OK] TYPO3\FLOW3\Mvc\Routing\ObjectPathMapping
[OK] TYPO3\FLOW3\Resource\Publishing\AbstractPublishingConfiguration
[OK] TYPO3\FLOW3\Resource\Resource
[OK] TYPO3\FLOW3\Security\Account
[OK] TYPO3\FLOW3\Security\Authorization\Resource\SecurityPublishingConfiguration
[OK] TYPO3\FLOW3\Security\Policy\Role
[OK] TYPO3\Party\Domain\Model\AbstractParty
pkg=$(adb shell pm path com.koushikdutta.backup)
# apparently pm path appends a carriage return which screws
# up the class name in dalvikvm invocation
pkg=$(echo $pkg | cut -d : -f 2 | sed s/\\r//g)
echo $pkg
adb shell << EOF
CLASSPATH=$pkg app_process /system/bin com.koushikdutta.shellproxy.ShellRunner2 $@ &
exit
EOF