Skip to content

Instantly share code, notes, and snippets.

View Jibbarth's full-sized avatar
🌴

Jibé Barth Jibbarth

🌴
View GitHub Profile
@balanza
balanza / ti.android.events.js
Last active March 10, 2017 14:59 — forked from kristjanmik/ti.android.events.js
A proper way to handle pause and resume event in titanium for android
/**
* A little workaround to proper handle resume and paused events on Android
*/
var platformTools = require('bencoding.android.tools').createPlatform();
var wasInForeGround = true;
//to be executed on every activity staus change
//check if it's passing from foreground to background or viceversa
function checkStatusSwitch() {
var isInForeground = platformTools.isInForeground();
@mstepanov
mstepanov / app.js
Created March 19, 2013 23:19
Titanium ListView Examples
var rootWin = Ti.UI.createWindow();
var navGroup = Ti.UI.iPhone.createNavigationGroup({
window: rootWin
});
var button = Ti.UI.createButton({
title: 'Open ListView Tests'
});
button.addEventListener('click', function() {
openTestsWindow();
});
@jeremeamia
jeremeamia / php-library-building.md
Created November 28, 2018 09:24
List of resources to help with building libraries
@MaximePinot
MaximePinot / .htaccess
Created February 4, 2019 11:11
A .htaccess file made for Symfony 4 apps deployed with Deployer.
# Use the front controller as index file. It serves as a fallback solution when
# every other rewrite/redirect fails (e.g. in an aliased environment without
# mod_rewrite). Additionally, this reduces the matching process for the
# start page (path "/") because otherwise Apache will apply the rewriting rules
# to each configured DirectoryIndex file (e.g. index.php, index.html, index.pl).
DirectoryIndex index.php
Options FollowSymlinks
# Disabling MultiViews prevents unwanted negotiation, e.g. "/index" should not resolve
@manumaticx
manumaticx / README.md
Last active July 11, 2020 14:07
Fading ActionBar in Titanium

Fading Actionbar

This is a quick example of how to create a fading actionbar effect like this in Appcelerator Titanium

fadingactionbar

How this works

This is actually very simple. The trick is putting the Actionbar in overlay mode by configuring the theme with windowActionBarOverlay:true. Then all you need to do is updating the color of the Actionbar, in this case by scrolling a ScrollView.

@pooot
pooot / uppy-vue-example
Created January 2, 2018 15:54
Very basic vuejs usage of uppy
<template>
<div :id="uppyId">
<div class="ThumbnailContainer" v-if="collection === 'thumbnail'">
<button id="open-thumbnail-modal" class="button">Select file</button>
</div>
<div class="DashboardContainer" v-else></div>
</div>
</template>
@philippecarle
philippecarle / DiscriminatorFilter.php
Created September 18, 2018 07:26
Discriminator Filter for API Platform
<?php
declare(strict_types=1);
namespace AppBundle\Filter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\AbstractContextAwareFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Metadata\Resource\Factory\ResourceMetadataFactoryInterface;
use Doctrine\Common\Persistence\ManagerRegistry;
@mbabker
mbabker / RemoveSyliusMigrationsPass.php
Last active November 10, 2020 07:59
Compiler pass which removes migration paths added by SyliusCoreBundle and SyliusAdminApiBundle (or other third party packages), useful if you are manually managing all migrations within your Sylius application
<?php declare(strict_types=1);
namespace App\DependencyInjection\Compiler;
use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
final class RemoveSyliusMigrationsPass implements CompilerPassInterface
{
public function process(ContainerBuilder $container)
@faizanakram99
faizanakram99 / ArgumentResolverTest.php
Last active October 13, 2021 13:07
RequestDTOArgumentValueResolver
<?php
namespace Qbil\Tests\CommonBundle\Services;
use Qbil\CommonBundle\Services\DTOArgumentValueResolver;
use Qbil\Tests\Fixtures\Controller\DTOController;
use Qbil\Tests\Fixtures\DTO\Person;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpKernel\Controller\ArgumentResolver;
@ricardoalcocer
ricardoalcocer / themes.md
Last active October 15, 2021 08:10
Changing Android ActionBar Theme and Android Style

Customizing the overall App Style

This guide has been updated for Titanium SDK 3.3.0 which uses AppCompat to bring the ActionBar to Android 2.3.x

Android has a build-in theming system. Using this feature you can easily change the base color Android uses for its controls across your app, allowing you to provide better branding and personalization, while maintaining Android's UI and UX.

Android built-in themes are:

  • Holo (Mostly Black and Cyan)
  • Holo Light (Mostly White and Gray)