Skip to content

Instantly share code, notes, and snippets.

View syousif94's full-sized avatar

Sammy syousif94

  • 18:11 (UTC -07:00)
View GitHub Profile
@syousif94
syousif94 / format.js
Created June 23, 2015 05:06
React Native renderSectionHeader example
//First put this in your constructor function:
var getSectionData = (dataBlob, sectionID) => {
return dataBlob[sectionID];
}
var getRowData = (dataBlob, sectionID, rowID) => {
return dataBlob[sectionID + ':' + rowID];
}
this.ds = new ListView.DataSource({
getSectionData: getSectionData,
getRowData: getRowData,
/*
Generic Canvas Overlay for leaflet,
Stanislav Sumbera, April , 2014
- added userDrawFunc that is called when Canvas need to be redrawn
- added few useful params fro userDrawFunc callback
- fixed resize map bug
inspired & portions taken from : https://github.com/Leaflet/Leaflet.heat
License: MIT
@syousif94
syousif94 / L.CanvasOverlay.js
Created April 10, 2016 23:29
preview of instabus
/*
Generic Canvas Overlay for leaflet,
Stanislav Sumbera, April , 2014
- added userDrawFunc that is called when Canvas need to be redrawn
- added few useful params fro userDrawFunc callback
- fixed resize map bug
inspired & portions taken from : https://github.com/Leaflet/Leaflet.heat
License: MIT
export let iOS = (navigator.userAgent.indexOf('iPhone OS') > -1) || (navigator.userAgent.indexOf('iPad') > -1)
export let android = navigator.userAgent.indexOf('Android') > -1
export let windowsPhone = navigator.userAgent.indexOf('Windows Phone') > -1
export let mobile = iOS || android || windowsPhone

Keybase proof

I hereby claim:

  • I am syousif94 on github.
  • I am syousif (https://keybase.io/syousif) on keybase.
  • I have a public key ASCKvJZVMgc0at1-xWxkDJTS9HeF4x8WlL0NlWkifkaaLwo

To claim this, I am signing this object:

@syousif94
syousif94 / index.html
Created May 11, 2017 12:01
map box gl performance
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.js"></script>
<link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.37.0/mapbox-gl.css" rel="stylesheet" />
<style>
body { margin:0; padding:0; display: flex; justify-content: center; align-items: center; }
#map { height: 768px; width: 1024px; }
</style>
@syousif94
syousif94 / policy.txt
Created February 3, 2019 09:04
Buncha Privacy Policy
Buncha does not collect identifiable user information.
@syousif94
syousif94 / policy.txt
Created May 23, 2019 07:50
Sprinkle Privacy Policy
Sprinkle stores anonymous device locations. That's all.
@syousif94
syousif94 / infiniteReddit.js
Created October 15, 2019 03:37
infinite reddit
function run() {
console.log('sup')
$('#siteTable').jscroll({
nextSelector: 'span.nextprev a:last',
contentSelector: '#siteTable .thing, .nav-buttons',
callback: function() {
$('.nav-buttons').remove();
}
@syousif94
syousif94 / Example.swift
Created May 1, 2020 07:43
handle keyboard notifications in swift
class ViewController: UIViewController, KeyboardObserverDelegate {
let keyboardObserver = KeyboardObserver()
let scrollView = UIScrollView()
let randomView = UIView()
func viewDidLoad() {
super.viewDidLoad()