Skip to content

Instantly share code, notes, and snippets.

View heyarny's full-sized avatar
🐙
www.bubblebump.com

Arnold heyarny

🐙
www.bubblebump.com
  • Switzerland
View GitHub Profile
//
// HostingCell.swift
// theathletic-ios
//
// Created by .
// Copyright © 2021 The Athletic. All rights reserved.
//
import SwiftUI
import UIKit
@heyarny
heyarny / flutter_spanablegrid.dart
Created August 30, 2021 14:32 — forked from aloisdeniel/flutter_spanablegrid.dart
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);
}
@heyarny
heyarny / variable_sized_grid_view.dart
Created August 25, 2021 20:33 — forked from letsar/variable_sized_grid_view.dart
VariableSizedGridView for Flutter (Masonry style)
import 'dart:math' as math;
import 'package:flutter/foundation.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/widgets.dart';
/// Signature for a function that creates a [TileSize] for a given index.
typedef TileSize IndexedTileSizeBuilder(int index);
/// Creates grid layouts with a fixed number of spans in the cross axis.
@heyarny
heyarny / StompMessage.java
Created January 16, 2018 18:44
STOMP over WebSocket for Android. Because there are really no simple and easy libraries, I've ported my ObjC code to Java for Android. Using okhttp3 websockets. Feel free to use it as you like. WTF License.
package com.some.app.extras.stompoverws;
import java.util.Map;
/**
* Created by arny on 15.01.18.
*/
public class StompMessage {
@heyarny
heyarny / mod_msg_filter.erl
Created April 15, 2017 17:26 — forked from mardambey/mod_msg_filter.erl
mod_msg_filter allows the filtering of "message" stanzas across an HTTP service.
%%
%% mod_msg_filter allows the filtering of "message"
%% stanzas across an HTTP service. The URL of the
%% service must be passed as part of the module's
%% configuration. Both JIDs and their resources are
%% passed as part of the query string and the result
%% is expected to be one of:
%%
%% <status value="denied">
%% <stanza1><error/></stanza1>
@heyarny
heyarny / Emoji.java
Created April 6, 2016 12:49
Slim Java port of twemoji (Twitter Emoji)
package com.eingrad.common;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.lang3.StringUtils;
/**
* Slim Java port of twemoji (Twitter Emoji)