Skip to content

Instantly share code, notes, and snippets.

View falcon11's full-sized avatar
🌏
🐳

Ashoka falcon11

🌏
🐳
View GitHub Profile
@falcon11
falcon11 / jquery-scroll-bottom.js
Created February 26, 2019 09:48 — forked from toshimaru/jquery-scroll-bottom.js
Detect the scrolling to bottom of the page using jQuery.
$(window).on("scroll", function() {
var scrollHeight = $(document).height();
var scrollPosition = $(window).height() + $(window).scrollTop();
if ((scrollHeight - scrollPosition) / scrollHeight === 0) {
// when scroll to bottom of the page
}
});
@falcon11
falcon11 / topview.js
Created September 12, 2018 01:09 — forked from mactive/topview.js
rn-topview
/**
* mactive@gmail.com
* 2017-05-08
*/
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
@falcon11
falcon11 / README.md
Last active June 24, 2025 04:11
A react native year month picker.

react-native-year-month-picker

A year month picker component for react native.

Usage

import yearMonthPicker.js file to your project.
detail usage you can check for the example.js file.
or open this snap in expo

@falcon11
falcon11 / react-native-pinch-zoom.js
Created May 18, 2018 04:47 — forked from zshell31/react-native-pinch-zoom.js
React Native: how to implement pinch to zoom gesture
/** Links:
* - http://stackoverflow.com/questions/36368919/scrollable-image-with-pinch-to-zoom
* - http://blog.lum.pe/gesture-detection-in-react-native-fixing-unexpected-panning/
*
*/
import React, {Component, PropTypes} from 'react';
import { Text, View, PanResponder, Image } from 'react-native';
function calcDistance(x1, y1, x2, y2) {
@falcon11
falcon11 / ios_detect.swift
Created April 20, 2018 16:15 — forked from mahmudahsan/ios_detect.swift
iPhone X and other iOS device detection by Swift and Objective-C
struct Device {
// iDevice detection code
static let IS_IPAD = UIDevice.current.userInterfaceIdiom == .pad
static let IS_IPHONE = UIDevice.current.userInterfaceIdiom == .phone
static let IS_RETINA = UIScreen.main.scale >= 2.0
static let SCREEN_WIDTH = Int(UIScreen.main.bounds.size.width)
static let SCREEN_HEIGHT = Int(UIScreen.main.bounds.size.height)
static let SCREEN_MAX_LENGTH = Int( max(SCREEN_WIDTH, SCREEN_HEIGHT) )
static let SCREEN_MIN_LENGTH = Int( min(SCREEN_WIDTH, SCREEN_HEIGHT) )