Skip to content

Instantly share code, notes, and snippets.

@DenisMir
DenisMir / view_pager_tabs_fragment
Created August 21, 2012 11:10
Android ActionBar Tabs - ViewPager - Multiple Fragments in one Tab
...
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
viewPager = new ViewPager(this);
viewPager.setId(R.id.pager);
setContentView(viewPager);
ActionBar bar = getSupportActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
tabsAdapter = new TabsAdapter(this, viewPager);
@DenisMir
DenisMir / gist:64c6f1829b51c20bd578
Last active August 29, 2015 14:07
Fluid Powered Typo3
<f:section name="Sidebar">
<v:content.render column="0" as="sidebarContentElements">
<f:if condition="{sidebarContentElements}">
Content available.
<f:for each="{sidebarContentElements}" as="sidebarContentElement">
Each item.
<f:format.raw>{sidebarContentElement}</f:format.raw>
</f:for>
</f:if>
</v:content.render>
@DenisMir
DenisMir / gist:69357fd44ce7a917674c
Created October 2, 2014 13:13
Simple Fluid Custom Content Element - Template
<div xmlns="http://www.w3.org/1999/xhtml" lang="en"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers"
xmlns:flux="http://typo3.org/ns/FluidTYPO3/Flux/ViewHelpers"
xmlns:v="http://typo3.org/ns/FluidTYPO3/Vhs/ViewHelpers">
<f:layout name="Content" />
<f:section name="Configuration">
<flux:form id="fluidfluxcontent" label="Custom Text" icon="{f:uri.resource(path: 'Icons/Page.gif')}">
<flux:field.input name="text" label="Inhalt" required="true" />
@DenisMir
DenisMir / gist:44ac778fef949702ab30
Created October 2, 2014 13:17
Custom Fluid Content Element - Layout
<f:layout name="Content" />
<f:render "Main" />
plugin.tx_<extension name>.view {
templateRootPath = {$plugin.tx_<extension name>.view.templateRootPath}
partialRootPath = {$plugin.tx_<extension name>.view.partialRootPath}
layoutRootPath = {$plugin.tx_<extension name>.view.layoutRootPath}
}
<?php
if (!defined('TYPO3_MODE')) {
die ('Access denied.');
}
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'Master');
Tx_Flux_Core::registerProviderExtensionKey('<extension name>', 'Page');
Tx_Flux_Core::registerProviderExtensionKey('<extension name>', 'Content');
@DenisMir
DenisMir / index.js
Last active August 29, 2015 14:10
Ghost Frontend HTTP Basic Auth
var express,
ghost,
app,
basicAuth,
path;
// Proceed with startup
express = require('express');
ghost = require('ghost');
basicAuth = require('basic-auth-connect');
@DenisMir
DenisMir / test.scss
Created December 10, 2014 09:25
Sassdoc @see annotation
/**
* Test
*
* @author Denis Mir
**/
/**
* Reference
*
* @type Map
#!/bin/bash
#########################################################
mgUSERNAME="MailGun Username"
mgPASSWORD="COMPLEX PASSWORD"
testEmail="[email protected]"
#########################################################
echo "Installing this agent may be dangerous, make sure this is the correct server!"
page.headerData.10 = FILE
page.headerData.10 {
file = fileadmin/some.js
stdWrap.hash = md5
stdWrap.wrap = <script src="/fileadmin/some.js?|" async></script>
}