Skip to content

Instantly share code, notes, and snippets.

View mutationevent's full-sized avatar

Achraf Bouyakhsass mutationevent

View GitHub Profile
@slightfoot
slightfoot / page_turn.dart
Created September 9, 2019 21:28
Page Turn Effect - By Simon Lightfoot. Replicating this behaviour. https://www.youtube.com/watch?v=JqvtZwIJMLo
// MIT License
//
// Copyright (c) 2019 Simon Lightfoot
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@aloisdeniel
aloisdeniel / flutter_spanablegrid.dart
Last active February 25, 2025 08:03
Custom GridView with various cell sizes in Flutter
import 'dart:math' as math;
import 'package:flutter/material.dart';
import 'package:flutter/src/rendering/sliver.dart';
import 'package:flutter/src/rendering/sliver_grid.dart';
class _CoordinateOffset {
final double main, cross;
_CoordinateOffset(this.main, this.cross);
}
@JigarM
JigarM / app.js
Created July 3, 2014 12:25
How Publish a Tweet (Titanium) using Codbird.js
var win = Ti.UI.createWindow();
// Main Window
var twitter = Ti.UI.createButton({
title : 'Set Tweet'
});
var accessToken = null;
var accessTokenSecret = null;
///////////LOAD ACCESS TOKEN
anonymous
anonymous / index.html
Created July 2, 2013 23:45
A CodePen by Daniel Riemer. Paral & Lax - Easy peasy parallax effect
<link href='http://fonts.googleapis.com/css?family=Droid+Sans:700|Droid+Serif' rel='stylesheet' type='text/css'>
<div id="banner">
<div id="bannertext">
<h1>PARAL &amp; LAX</h1>
<p>Finest webdesign since 1870</p>
</div>
</div>
<div id="content">
anonymous
anonymous / index.html
Created July 2, 2013 22:41
A CodePen by A Non Ymous.
<ul class="simple-gallery">
<li class="show">
<img src="http://minimalmonkey.com/examples/simple-gallery/images/image-1.jpg" />
</li>
<li>
<img src="http://minimalmonkey.com/examples/simple-gallery/images/image-2.jpg" />
</li>
<li>
<img src="http://minimalmonkey.com/examples/simple-gallery/images/image-3.jpg" />
</li>
@dawsontoth
dawsontoth / animations.js
Created February 19, 2013 20:22
CommonJS module to make animations easier, like fading stuff out. Tested on iOS, Android, and Mobile Web.
/*
State.
*/
var simplify = Ti.Platform.osname === 'mobileweb';
var currentFlashes = {};
/*
Public API.
*/
exports.chainAnimateForever = chainAnimateForever;
@artanisdesign
artanisdesign / loader
Created November 17, 2012 11:28
circleloader
var CircleLoaderView = require("CircleLoaderView");
var myloader = new CircleLoaderView({
width : 200,
centerWidth : 100,
backgroundColor : "#fff",
tintColor : "blue",
textColor : "red",
labelFontSize : 28
@mattberg
mattberg / Parse.js
Created September 21, 2012 14:24
Simple Parse REST API module for Titanium
var baseUrl = 'https://api.parse.com/1',
appId = 'XXXXXXXXXXXXXXX',
apiKey = 'XXXXXXXXXXXXXX'; // make sure to use the REST API Key
var _register = function(params, lambda, lambdaerror) {
var method = 'POST',
url = baseUrl + '/installations',
payload = (params) ? JSON.stringify(params) : '';
_helper(url, method, payload, function(data, status) {
@dawsontoth
dawsontoth / draggable.js
Created July 25, 2012 03:43
Draggable Code Explained, Somewhat
var U = require('utils');
var VBN = require('viewBasedNavigator');
exports.applyTo = function(args) {
args = args || {};
U.def(args, {
id: null,
view: null,
anchor: 'left',
expanded: 320,
@Mode54
Mode54 / ActionBarView.js
Created July 22, 2012 16:00
Action Bar Module for Titanium Mobile
/*
* Android API Guide
* http://developer.android.com/guide/topics/ui/actionbar.html
* Android Design Guide
* http://developer.android.com/design/patterns/actionbar.html
* Titanium Mobile will support someday
* https://jira.appcelerator.org/browse/TIMOB-2371
*/
var osName = Ti.Platform.osname,
isAndroid = osName==='android',