Skip to content

Instantly share code, notes, and snippets.

View syousif94's full-sized avatar

Sammy syousif94

  • 00:39 (UTC -08:00)
View GitHub Profile
This app does not collect any user information.
@syousif94
syousif94 / copy-key-to-server.sh
Created May 1, 2020 23:10
copy ssh key to server
#!/bin/bash
cat ~/.ssh/id_rsa.pub | ssh remote_username@server_ip_address "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"
@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()
@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 / policy.txt
Created May 23, 2019 07:50
Sprinkle Privacy Policy
Sprinkle stores anonymous device locations. That's all.
@syousif94
syousif94 / policy.txt
Created February 3, 2019 09:04
Buncha Privacy Policy
Buncha does not collect identifiable user information.
@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>

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:

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