Skip to content

Instantly share code, notes, and snippets.

View nicholascm's full-sized avatar
🎯
Focusing

Nick nicholascm

🎯
Focusing
  • Positive Development
  • Remote
View GitHub Profile
<html>
<script>
(function myFunction() {
console.log(navigator.userAgent.toLowerCase())
if(navigator.userAgent.toLowerCase().indexOf("iphone") > -1){ window.location.href = 'https://apps.apple.com/us/app/your-app-url'; }
if(navigator.userAgent.toLowerCase().indexOf("android") > -1){ window.location.href = 'https://play.google.com/store/apps/details?id==your.package.name'; }
//Update #2
if (!navigator.userAgent.match(/(iPhone|iPod|iPad|Android|BlackBerry|IEMobile)/)) {
@nicholascm
nicholascm / parallel.sh
Last active November 5, 2020 03:08
Repeat Network Calls
# this script runs on background threads in (parallel)
python repeat_calls.py &
python repeat_calls.py &
python repeat_calls.py &
python repeat_calls.py &
python repeat_calls.py &
python repeat_calls.py &
@nicholascm
nicholascm / gitutils.ps1
Created February 28, 2018 21:19 — forked from vejandla/gitutils.ps1
Powershell functions for git information
# Git functions
# Mark Embling (http://www.markembling.info/)
# Is the current directory a git repository/working copy?
function isCurrentDirectoryGitRepository {
if ((Test-Path ".git") -eq $TRUE) {
return $TRUE
}
# Test within parent dirs
@nicholascm
nicholascm / Dr. Simon.markdown
Last active January 4, 2016 17:53
Dr. Simon